Each Claude conversation has a unique session ID (UUID), stored at ~/.claude/projects/<project>/<session-id>.jsonl.
- Desktop → Telegram: Sent automatically via hook scripts (triggered on every Claude response and user input)
- Telegram → Desktop: Forwarded by bridge to the Claude process in tmux
Desktop and Telegram share the same tmux terminal. Messages sent from Telegram are visible on desktop; Claude's desktop responses are also sent to Telegram.
The bridge auto-binds sessions:
- If the current session is not bound to any chat, the first Telegram message auto-binds it
- A background session poller detects new sessions every 5 seconds and auto-binds
- No need to manually run
/bind(unless you need to force re-bind)
Prerequisite: Bridge is running on desktop (./scripts/start.sh --new or ./scripts/start.sh)
- Open the Telegram bot chat
- Send any message
The bridge auto-detects the current session and binds it. If you see a prompt to bind, send /bind.
Goal: Send messages to desktop Claude from Telegram
Prerequisite: Bridge is running on desktop
- Open the Telegram bot chat
- Send your message
Messages are injected into Claude in the desktop tmux session. Claude's responses sync back to Telegram.
If you see "Not bound":
- Send
/bindto bind the current session - Or send
/continueto connect to the most recent session
Goal: Switch Claude conversations (desktop follows automatically)
/resume
Shows a list of recent sessions (full UUID + timestamp) for the current project. Tap to select.
/continue
Resumes the most recently modified session.
Note: When switching sessions, desktop Claude briefly restarts (1-2 seconds). Cross-project switches auto-
cdto the target project directory.
Goal: Browse different projects and select a session
/projects
- Shows project list (full paths, sorted by recent activity)
- Tap a project → shows its session list
- Tap a session to resume, or tap "New session"
Only shows sessions that are active within 30 days, non-empty, and properly formatted.
Cross-project operations automatically:
- Exit current Claude
cdto the target project directory- Start Claude and resume/create session
Goal: Temporarily stop bidirectional sync (without disconnecting)
/stop
Effects:
- Telegram messages no longer forwarded to desktop
- Desktop Claude responses no longer sent to Telegram
- Logs still recorded (continue writing to
~/.claude/logs/) - Desktop Claude works normally, unaffected
To resume:
/start ← start new conversation and resume
/resume ← pick a session and resume
/continue ← continue most recent session and resume
Goal: Claude is running a long task and you want to stop it
/escape
Equivalent to pressing Escape on desktop. Claude stops the current operation and waits for new input. Sync state is unchanged.
/escapevs/stop:/escapeonly interrupts Claude's current operation, sync stays active;/stoppauses the entire sync channel.
Goal: Completely stop sync
/terminate
Effects:
- Sync fully stopped
- Need
/startor/resumeto reconnect - Logs still recorded
Goal: Claude needs tool permission (Bash, Write, etc.) and you're away from the desktop
Prerequisite: Claude started without --dangerously-skip-permissions, bridge running
The PermissionRequest hook handles all tools in a single step — formats tool info and sends inline keyboard buttons to Telegram:
For Bash:
🔐 Bash:
npm install
[Yes] ← tap to approve
[Yes to all] ← approve all future Bash calls
[No] ← deny
For Edit / Write:
🔐 Edit: src/index.ts
[Yes] ← tap to approve
[Yes to all] ← approve all future Edit calls
[No] ← deny
For other tools:
🔐 Permission: Read
[Yes] ← tap to approve
[Yes to all]
[No]
Tap a button — the bridge navigates the CC terminal TUI via Down + Enter keystrokes.
AskUserQuestion is also handled by the same hook, with option buttons:
❓ Which library should we use for date formatting?
1. date-fns (Recommended)
2. dayjs
3. Intl API
[1. date-fns (Recommended)] ← tap to select
[2. dayjs] ← tap to select
[3. Intl API] ← tap to select
Note: Default
start.sh --newuses--dangerously-skip-permissions, which skips all permission checks. To use remote permission, start Claude without that flag.
/start
/resume
/continue
All commands above auto-clear paused/terminated state and restore sync.
/status
Shows:
- tmux session state (running / not found)
- Sync state (active / paused / terminated)
- Current session ID
- Binding state (whether bound to current chat)
Goal: Create tmux session + start Claude + start bridge + connect Telegram
# 1. Make sure env var is set
echo $TELEGRAM_BOT_TOKEN
# 2. Install hooks (first time only)
./scripts/start.sh --setup-hook
# 3. Create new session and start all services
./scripts/start.sh --new
# Or specify a project directory
./scripts/start.sh --new ~/Projects/my-appAfter launch, it auto-attaches to tmux. Send a Telegram message to test sync.
Goal: Use Claude Code on desktop, Telegram auto-receives notifications
# Start bridge (tmux session must already exist)
./scripts/start.sh- Use Claude Code on desktop as normal
- Your inputs and Claude's responses auto-sync to Telegram
- No action needed on Telegram
Goal: Fix unstable connection or out-of-sync messages
./scripts/start.shAutomatically:
- Stops old bridge and tunnel processes
- Starts new bridge
- Creates new cloudflared tunnel
- Sets Telegram webhook
- Registers latest bot command list
Goal: Quickly view recent Claude output without entering tmux
./scripts/start.sh --viewTo enter interactive mode:
./scripts/start.sh --attachTo exit tmux (from another terminal):
./scripts/start.sh --detachGoal: Start a new Claude session in a specific project directory
./scripts/start.sh --new ~/Projects/another-projectThe tmux session working directory is set to the specified path, and Claude starts in that directory.
Goal: Stop desktop → Telegram sync
./scripts/start.sh --terminateSame effect as Telegram /terminate. Fully stops sync. Restart bridge to resume.
Goal: Reinstall hooks after a code update
# Update hook scripts
./scripts/start.sh --setup-hook
# Restart bridge (registers latest commands)
./scripts/start.shNo need to reinstall the entire project.
Goal: Stop all related processes
# Method 1:
./scripts/start.sh --terminate
# Method 2: Press Ctrl+C in the bridge terminalOr manually clean up:
./scripts/start.sh --detach # detach from tmux first
./scripts/start.sh --terminate # terminate all processesFull command tables in Startup Guide.
For install issues see Installation Guide. For connection/log issues see Startup Guide.
A: This is expected. When switching sessions from Telegram, Claude briefly exits and restarts (1-2 seconds). The bridge handles this automatically. Cross-project switches cd to the target project directory first.
A: Send /bind to bind the current session, or just send another message (auto-binds).
A: /stop pauses the entire sync channel — bidirectional messages stop, need /start, /resume, or /continue to resume. /escape only interrupts Claude's current operation (like pressing Escape) — sync stays active.
A: Use /projects to browse projects and select a session. The bridge auto-detects cross-project switches and handles cd + restart.
A: Restart the bridge. It auto-registers the latest command list with the Telegram API on startup.
A: Run ./scripts/start.sh --setup-hook to update hook scripts, then ./scripts/start.sh to restart bridge and register new commands.