8db1b45fe9e00adae42ae0fd36358ccd9e92785f
- Up to 5 CC workers run concurrently - Each worker gets its own git worktree (no file conflicts) - Auto-merge branches when all workers succeed - --merge auto|always|none control merge strategy - --json output for Hermes integration - Tested: 2 workers, 21s total (vs 47s sequential)
hermes-cc-bridge
Hermes ↔ Claude Code SDK Bridge — hook-driven progress tracking with crash recovery.
Features
- Hook-driven completion: Stop event = done signal, no timeout guessing
- Real-time progress: PostToolUse events → tool breakdown, elapsed time
- Heartbeat detection (v3.2): 120s no tool calls → check process alive → auto-recover
- Crash recovery: CC process dead without Stop event → recover from hook state files
- Session ID tracking (v3.2): hook_monitor dynamically tracks session_id (was broken when None at startup)
Usage
python3 cc_sdk.py "fix the bug" --cwd ~/project --max-turns 8 --timeout 180 --json
python3 cc_sdk.py --progress <session_id>
Files
cc_sdk.py— SDK bridge (v3.2)hermes_hook.py— Hook script for Claude Code settings.json
Hook Setup
In ~/.claude/settings.json:
{
"hooks": {
"Stop": [{"matcher": "", "hooks": [{"type": "command", "command": "python3 /path/to/hermes_hook.py", "timeout": 10}]}],
"PostToolUse": [{"matcher": "", "hooks": [{"type": "command", "command": "python3 /path/to/hermes_hook.py", "timeout": 5}]}],
"Notification": [{"matcher": "", "hooks": [{"type": "command", "command": "python3 /path/to/hermes_hook.py", "timeout": 10}]}]
}
}
License
MIT
Languages
Python
100%