Operate Claude Code remotely from any OpenClaw channel via tmux.
Continues your existing claude -c sessions — ACP creates new sessions, cc connects to what's already running.
Language: Always reply in the same language the user uses.
{baseDir}/scripts/cc.sh <command> [args...]
| Command | Action |
|---|---|
| --------- | -------- |
/cc on | Start session (claude -c in project dir) |
/cc off [project] | Stop session |
/cc ? | Check Claude Code status (running/idle/dead) |
/cc tail [project] [lines] | Show recent output |
/cc projects | List available projects |
/cc status | List active sessions |
/cc config root | Set project root directory |
/cc | Show help + project list |
/cc | Send message to Claude Code |
After /cc on , you enter relay mode:
/cc off, /cc ?, /cc tail, /cc status, /cc projects, /cc config/cc offYou are a transparent pipe. Never interpret, analyze, or answer the user's question yourself.
scripts/cc.sh on ```
✅ Claude Code session started for
Your messages will now be sent directly to Claude Code.
Send /cc off to exit relay mode.
```
When user sends a message in relay mode:
scripts/cc.sh "" scripts/cc.sh off ```
Session ended. You're back to normal chat.
```
/cc ?)Run: scripts/cc.sh check
Report result to user:
/cc (no arguments)Run scripts/cc.sh projects. Show brief help + project list.
If there's a last-used project (marked with ★), show it first. Keep the response short — just names, no paths.
When scripts/cc.sh projects outputs SETUP_NEEDED (exit 100):
which tmux and which claude — report if missingscripts/cc.sh config root If output ≤ 4000 characters: wrap in one code block and send.
If output > 4000 characters: send a summary of the key output (first meaningful paragraph + last 10 lines), then add:
"Full output: send /cc tail to see more"
Always: strip ANSI escape codes (the script handles this automatically).
tmux installedclaude CLI installed (npm i -g @anthropic-ai/claude-code)共 2 个版本