Claude Code Wingman
by @yossiovadia
Your Claude Code wingman - orchestrate multiple Claude Code sessions across projects, monitor them all from WhatsApp
clawhub install claude-code-wingmanπ About This Skill
name: claude-code-wingman description: Your Claude Code wingman - orchestrate multiple Claude Code sessions across projects, monitor them all from WhatsApp metadata: {"clawdbot":{"emoji":"π¦ ","requires":{"anyBins":["claude","tmux"]}}}
Claude Code Wingman
Your multi-session orchestrator - manage multiple Claude Code instances working on different projects simultaneously, all from WhatsApp.
GitHub: https://github.com/yossiovadia/claude-code-orchestrator
β‘ CRITICAL: Handle Approval Commands First
When a user message matches these patterns, IMMEDIATELY run the corresponding command:
| User Message Pattern | Command to Run |
|---------------------|----------------|
| approve | ~/code/claude-code-orchestrator/lib/handle-approval.sh approve |
| always | ~/code/claude-code-orchestrator/lib/handle-approval.sh always |
| deny | ~/code/claude-code-orchestrator/lib/handle-approval.sh deny |
Examples:
~/code/claude-code-orchestrator/lib/handle-approval.sh approve vsr-bugfix~/code/claude-code-orchestrator/lib/handle-approval.sh always heartbeat-test~/code/claude-code-orchestrator/lib/handle-approval.sh deny proxy-refactorAfter running, respond with the command output (e.g., "β Session 'vsr-bugfix' approved (once)")
Why this is critical: The master monitor daemon sends WhatsApp notifications when Claude Code sessions need approval. The user responds with these commands from their phone. Fast response = unblocked sessions.
Quick Status Commands
| User Message | Command to Run |
|--------------|----------------|
| sessions or status | ~/code/claude-code-orchestrator/lib/session-status.sh --all --json |
| status | ~/code/claude-code-orchestrator/lib/session-status.sh |
Parse the JSON and respond with a human-readable summary.
What It Does
Orchestrates multiple Claude Code sessions in parallel, each working on different tasks in different directories. You monitor and control everything remotely via WhatsApp/chat.
The Vision:
π― Real-World Example: Multi-Session Orchestration
Morning - You (via WhatsApp): "Start work on VSR issue #1131, Clawdbot authentication feature, and refactor the proxy"
Clawdbot spawns 3 sessions:
β
Session: vsr-issue-1131 (~/code/semantic-router)
β
Session: clawdbot-auth (~/code/clawdbot)
β
Session: proxy-refactor (~/code/claude-code-proxy)
During lunch - You: "Show me the dashboard"
Clawdbot:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Active Claude Code Sessions β
βββββββββββββββββββ¬βββββββββββββββββββββββ¬βββββββββββββββββ€
β vsr-issue-1131 β semantic-router β β
Working β
β clawdbot-auth β clawdbot β β
Working β
β proxy-refactor β claude-code-proxy β β³ Waiting approval β
βββββββββββββββββββ΄βββββββββββββββββββββββ΄βββββββββββββββββ
You: "How's the VSR issue going?"
Clawdbot captures session output: "Almost done - fixed the schema validation bug, running tests now. 8/10 tests passing."
You: "Tell proxy-refactor to run tests next"
Clawdbot sends command to that specific session.
Result: 3 parallel tasks, full remote control from your phone. π―
Installation
Via Clawdbot (Recommended)
clawdbot skill install claude-code-wingman
Or visit: https://clawdhub.com/skills/claude-code-wingman
Manual Installation
cd ~/code
git clone https://github.com/yossiovadia/claude-code-orchestrator.git
cd claude-code-orchestrator
chmod +x *.sh lib/*.sh
Requirements
claude CLI (Claude Code)tmux (terminal multiplexer)jq (JSON processor)Core Philosophy: Always Use the Wingman Script
CRITICAL: When interacting with Claude Code sessions, ALWAYS use the wingman script (claude-wingman.sh). Never run raw tmux commands directly.
Why:
Wrong (DON'T DO THIS):
tmux send-keys -t my-session "Run tests"
^ Might forget C-m, won't be tracked in dashboard
Right (ALWAYS DO THIS):
~/code/claude-code-orchestrator/claude-wingman.sh \
--session my-session \
--workdir ~/code/myproject \
--prompt "Run tests"
Usage from Clawdbot
Start a New Session
When a user asks for coding work, spawn Claude Code:
~/code/claude-code-orchestrator/claude-wingman.sh \
--session \
--workdir \
--prompt ""
Send Command to Existing Session
To send a new task to an already-running session:
~/code/claude-code-orchestrator/claude-wingman.sh \
--session \
--workdir \
--prompt ""
Note: The script detects if the session exists and sends the command to it instead of creating a duplicate.
Check Session Status
tmux capture-pane -t -p -S -50
Parse the output to determine if Claude Code is:
Example Patterns
User: "Fix the bug in api.py"
Clawdbot:
Spawning Claude Code session for this...[Runs wingman script]
β
Session started: vsr-bug-fix
π Directory: ~/code/semantic-router
π― Task: Fix bug in api.py
User: "What's the status?"
Clawdbot:
tmux capture-pane -t vsr-bug-fix -p -S -50
Then summarize: "Claude Code is running tests now, 8/10 passing"
User: "Tell it to commit the changes"
Clawdbot:
~/code/claude-code-orchestrator/claude-wingman.sh \
--session vsr-bug-fix \
--workdir ~/code/semantic-router \
--prompt "Commit the changes with a descriptive message"
Commands Reference
Start New Session
~/code/claude-code-orchestrator/claude-wingman.sh \
--session \
--workdir \
--prompt ""
Send Command to Existing Session
~/code/claude-code-orchestrator/claude-wingman.sh \
--session \
--workdir \
--prompt ""
Monitor Session Progress
tmux capture-pane -t -p -S -100
List All Active Sessions
tmux ls
Filter for Claude Code sessions:
tmux ls | grep -E "(vsr|clawdbot|proxy|claude)"
View Auto-Approver Log (if needed)
cat /tmp/auto-approver-.log
Kill Session When Done
tmux kill-session -t
Attach Manually (for user)
tmux attach -t
Detach: Ctrl+B, then D
Roadmap: Multi-Session Dashboard (Coming Soon)
Planned features:
wingman dashboard
Shows all active Claude Code sessions:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Active Claude Code Sessions β
βββββββββββββββββββ¬βββββββββββββββββββββββ¬βββββββββββββββββ€
β Session β Directory β Status β
βββββββββββββββββββΌβββββββββββββββββββββββΌβββββββββββββββββ€
β vsr-issue-1131 β ~/code/semantic-... β β
Working β
β clawdbot-feat β ~/code/clawdbot β β³ Waiting approval β
β proxy-refactor β ~/code/claude-co... β β Error β
βββββββββββββββββββ΄βββββββββββββββββββββββ΄βββββββββββββββββTotal: 3 sessions | Working: 1 | Waiting: 1 | Error: 1
wingman status
Detailed status for a specific session:
Session: vsr-issue-1131
Directory: ~/code/semantic-router
Started: 2h 15m ago
Last activity: 30s ago
Status: β
Working
Current task: Running pytest tests
Progress: 8/10 tests passing
Session Registry
For now: Use tmux commands directly, but always via the wingman script for sending commands!
Workflow
1. User requests coding work (fix bug, add feature, refactor, etc.) 2. Clawdbot spawns Claude Code via orchestrator script 3. Auto-approver handles permissions in background 4. Clawdbot monitors and reports progress 5. User can attach anytime to see/control directly 6. Claude Code does the work autonomously β
Trust Prompt (First Time Only)
When running in a new directory, Claude Code asks: > "Do you trust the files in this folder?"
First run: User must attach and approve (press Enter). After that, it's automatic.
Handle it:
User, Claude Code needs you to approve the folder trust (one-time). Please run:
tmux attach -t Press Enter to approve, then Ctrl+B followed by D to detach.
Best Practices
When to Use Orchestrator
β Use orchestrator for:
β Don't use orchestrator for:
Session Naming
Use descriptive names:
vsr-issue-1131 - specific issue workvsr-feature-auth - feature developmentproject-bugfix-X - bug fixesTroubleshooting
Prompt Not Submitting
The orchestrator sends Enter twice with delays. If stuck, user can attach and press Enter manually.Auto-Approver Not Working
Check logs:cat /tmp/auto-approver-.log Should see: "Approval prompt detected! Navigating to option 2..."
Session Already Exists
Kill it:tmux kill-session -t Advanced: Update Memory
After successful tasks, update TOOLS.md:
### Recent Claude Code Sessions
2026-01-26: VSR AWS check - verified vLLM server running β
Session pattern: vsr-* for semantic-router work
Pro Tips
π Approval Handling (WhatsApp Integration)
The master monitor daemon sends WhatsApp notifications when sessions need approval. Handle them with these commands:
Approve Commands (from WhatsApp)
When you receive an approval notification, respond with:
Clawdbot parses your message and runs:
# Approve once
~/code/claude-code-orchestrator/lib/handle-approval.sh approve Approve all similar (always)
~/code/claude-code-orchestrator/lib/handle-approval.sh always Deny
~/code/claude-code-orchestrator/lib/handle-approval.sh deny
Example WhatsApp Flow
Notification received:
π Session 'vsr-bugfix' needs approvalBash(rm -rf ./build && npm run build)
Reply with:
β’ approve vsr-bugfix - Allow once
β’ always vsr-bugfix - Allow all similar
β’ deny vsr-bugfix - Reject
You reply: "approve vsr-bugfix"
Clawdbot:
~/code/claude-code-orchestrator/lib/handle-approval.sh approve vsr-bugfix
Response: "β Session 'vsr-bugfix' approved (once)"
Start the Monitor Daemon
# Start monitoring all sessions (reads config from ~/.clawdbot/clawdbot.json)
~/code/claude-code-orchestrator/master-monitor.sh &With custom intervals
~/code/claude-code-orchestrator/master-monitor.sh --poll-interval 5 --reminder-interval 120 &Check if running
cat /tmp/claude-orchestrator/master-monitor.pidView logs
tail -f /tmp/claude-orchestrator/master-monitor.logStop the daemon
kill $(cat /tmp/claude-orchestrator/master-monitor.pid)
No environment variables needed - phone and webhook token are read from Clawdbot config.
π Tips & Best Practices
When to Use Orchestrator
β Use orchestrator for:
β Don't use orchestrator for:
Session Naming
Use descriptive names:
vsr-issue-1131 - specific issue workvsr-feature-auth - feature developmentproject-bugfix-X - bug fixes