Add shared project and session selection across IM adapters, preserve bindings on failed restoration, and synchronize permissions with desktop clients. Fixes #1286
8.5 KiB
title, nav_title, description, order
| title | nav_title | description | order |
|---|---|---|---|
| IM Integrations | Overview | Bridge Feishu, Telegram, WeChat, DingTalk, WhatsApp, WeCom, QQ, or Slack private chats into the Desktop app and continue the same session from your phone. | 0 |
IM Integrations
A session running in the Desktop app can be reached from a private chat on your phone. Once bound, a message in Feishu, Telegram, WeChat, DingTalk, WhatsApp, WeCom, QQ, or Slack drives the Claude Code session on your own machine: start a long task before you leave, then follow the progress, approve permissions, and switch projects from the road.
The chat partner is a bot or account you bound yourself. Messages reach your local Desktop app; no intermediate service holds your code.
What you get
- The same session, continued. Messages sent from your phone enter the Claude Code session on your computer, where file edits, commands, and reads really happen.
- Resume history.
/sessionslists history in the current project;/sessions <project name or absolute path>opens another project. Use/resume <number>to continue, including sessions created on Desktop. - Project switching.
/projectslists recent projects and switches to the one you pick;/newstarts a fresh session. - Permission approval. When Claude wants to write a file or run a risky command, the request is pushed to the chat. Feishu and DingTalk send interactive cards, Telegram sends buttons, and every other platform expects a text reply.
- Status and stop.
/statusreports the current project, model, and run state;/stopinterrupts the current turn.
The Desktop app has to stay running. The chat side is only a remote control.
Choosing a platform
All eight expose the same capabilities. They differ in setup cost and approval experience.
| Platform | How you connect | Best for | Known limits |
|---|---|---|---|
| Feishu | Scan a QR code in Settings; the bot is created and its credentials stored for you | Teams that want one-tap permission approval | Private (p2p) chats only; menu changes require publishing a new app version |
| Telegram | Ask @BotFather for a Bot Token, paste it into Settings |
Individuals who can reach Telegram; fastest setup | Private chats only |
| Scan a QR code in Settings to log in a bot account | People who only want WeChat | Private chats only; permission approval is text replies | |
| DingTalk | Scan a QR code in Settings; credentials are filled in for you | Organizations already on DingTalk | Private chats only; interactive approval cards need an extra template ID |
| Scan from Linked devices on your phone | Users outside mainland China | Personal linked-device login, not the official Cloud API; personal private chats only | |
| WeCom | Scan a QR code in Settings to create an AI bot | Organizations on Enterprise WeChat | Private chats only; permission approval is text replies |
| Scan a QR code in Settings; credentials are filled in for you | Individuals on QQ | Private (C2C) chats only, no groups or guilds; text approval | |
| Slack | Create the app from a pre-filled manifest, paste two tokens | Teams on Slack | Direct messages only; no QR flow, tokens are pasted by hand |
If you have no preference, start with Telegram or Feishu — their approval flows are the most comfortable.
Pairing flow
Binding happens in two layers: first the Desktop app gets platform credentials, then your personal account is authorized with a pairing code. The second layer is identical everywhere.
- Open Settings → IM Adapters.
- Bind one platform in its tab: Feishu, WeChat, DingTalk, WhatsApp, WeCom, and QQ use a QR code; Telegram and Slack take credentials.
- Pick a directory under Default Project.
- Select Save.
- Back at the top, in Pairing, select Generate Code to get a six-character code.
- Send that code to your bot in a private chat on the matching platform.
- Once pairing is confirmed, anything you type goes to Claude Code.
A code is valid for 60 minutes, works once, and is invalidated the moment a new one is generated. The code itself is platform-neutral — it binds whichever account sends it. Five failed attempts within five minutes trigger rate limiting.
Generating a code and QR binding are written to local configuration immediately. Save is only needed for typed values such as App ID, Bot Token, Allowed Users, and Default Project.
Paired accounts appear under Paired Users, where Unbind revokes one of them. A revoked user needs a fresh code.
Default project decides where work happens
Default Project is the working directory for new IM sessions. With it set, the first message from your phone opens a session in that directory. Left empty, the bot lists recent projects and asks you to choose.
Later messages in the same chat reuse that session, and the mapping survives a Desktop restart. /new changes the directory; /clear empties the context while keeping the project binding.
Find an old session from your phone
Send /sessions to list history for your current project. Without a session binding, it starts with a project picker. Use /sessions projects to choose a different project, or /sessions <project name or absolute path> to open one directly. Ambiguous names show a list to choose from.
Each page shows eight sessions with their title, update time, message count, and a marker for the current session. Reply with a number shown on that page or send /resume <number> to continue the selected conversation. Use /sessions next and /sessions prev to turn pages. Accessible worktree sessions are grouped under their project and resume in their original working directory.
Browsing preserves the current binding. /cancel exits selection; ordinary chat text also leaves the history picker and continues your current conversation. Lists expire after 15 minutes. Finish pending approvals or send /stop and wait for the current turn to stop before switching. If a session was deleted, its directory is unavailable, or connecting fails, the original binding is retained.
Telegram also keeps its /resume project and session button menu. The text commands above work on all platforms.
Common commands
Entry points differ slightly per platform — Feishu can expose commands as a bot menu — but these work everywhere:
/help— list available commands/status— current project, model, and run state/projects— list recent projects and switch/new— start a new session, optionally with a project number or path/sessions [project]— list old sessions;/sessions projectschooses another project/resume <number>— continue a session from the list/cancel— exit selection and keep the current session/clear— clear context, keep the project binding/stop— stop the current generation
Feishu, WeChat, DingTalk, WeCom, QQ, and Slack also accept Chinese aliases such as 帮助, 状态, 项目列表, 新会话, 清空, and 停止.
Security
::: warning This is a remote control for your computer A paired account can make Claude read files, write files, and run commands on your machine. Send pairing codes only to yourself, never post one in a group, and never commit bot credentials. :::
Authorization is the union of Allowed Users and paired users. When both are empty, every sender is rejected. Binding a bot or a linked account does not authorize its contacts.
Platform credentials, pairing state, and allowlists live in ~/.claude/adapters.json; chat-to-session mappings live in ~/.claude/adapter-sessions.json. Both stay on your machine, both contain material that can drive it, and neither should be shared. Sensitive fields are masked when the settings page reads the configuration back. Both paths follow CLAUDE_CONFIG_DIR when a custom data directory is active.
For a full mobile interface rather than a chat window, see H5 access.
Per-platform guides
- Feishu — scan to create a bot, card approval
- Telegram — BotFather token, button approval
- WeChat — QR-bound account, text approval
- DingTalk — QR authorization, AI Card streaming
- WhatsApp — personal linked device, text approval
- WeCom — scan to create an AI bot, streaming replies
- QQ — QR authorization, private-chat streaming
- Slack — app manifest, Socket Mode connection
