Claude Code from Teams

A Teams bridge for coding on the go

Microsoft Teams + Claude Agent SDK
Altinok Darici

Why?

  • Claude Code is powerful — but you need a terminal in front of you
  • I wanted to send it tasks from my phone: while commuting, between meetings, wherever
  • Teams is already on my phone, already authenticated, already where I work
  • So I built a bridge: Teams message in → Claude Code runs → response back in the thread

How it looks

Features

  • Each Teams thread is its own Claude Code session — multiple projects at once
  • Switch projects mid-conversation — just say "work on project-xyz, fix the tests"
  • Task scheduler — cron-based recurring and one-time tasks, triggered through Teams
  • Shared memory file injected into every session — repo locations, codespace names, user preferences
  • Full tool access: Read, Edit, Bash, Grep, and everything Claude Code can do
  • Codespace and MDB support — spawn or connect new machine and run Claude Code remotely via SSH (WIP)

How it's built

graph LR
    A["  📱 Teams Channel  "]:::teams -->|"⚡ WebSocket"| B["🔀 Bridge\n\nOrchestrator · Sessions · Claude SDK"]:::bridge
    B -->|"query( )"| C["🤖 Claude Code"]:::claude
    C -.->|"streaming response"| B
    B -.->|"HTTP API edit message"| A
    C -->|"create_task( )"| D["⏰ Task Scheduler\n\ncron · one-time"]:::scheduler
    D -->|"sends message"| A

    classDef teams fill:#464775,stroke:#7b83eb,stroke-width:2px,color:#fff,font-size:20px
    classDef bridge fill:#1a3a5c,stroke:#2899f5,stroke-width:2px,color:#fff,font-size:20px
    classDef claude fill:#1a3c2a,stroke:#6ccb5f,stroke-width:2px,color:#6ccb5f,font-size:20px
    classDef scheduler fill:#4a3520,stroke:#f7630c,stroke-width:2px,color:#f7630c,font-size:20px
      
Runs on my desktop 24/7
No tunnel, no ngrok — pure outbound connections
No polling — WebSocket push
Direct Teams API via az CLI tokens

What we learned

  • Agent SDK lets you customize how Claude Code is spawned — insanely powerful. SSH into remote machines, codespaces, anything
  • Some parts must be deterministic, most can be probabilistic — Teams communication is deterministic code with guardrails; features like task scheduler, GitHub, ADO connections are built as skills
  • Deterministic code is the only way to get 100% guardrails (as long as Claude doesn't modify the code 😅)
  • Full audit logs are essential — without traces, LLM bugs are impossible to reproduce
  • Prompt engineering matters — "Don't do X" is weaker than "Do Y instead, because Z"

Thanks!

Questions?

github.com/altinokdarici/ct-bot