Claude Code Bridge — Multi-Instance Edition
Run multiple CCB instances in parallel, with LLM communication fixes included.
An enhanced fork of Claude Code Bridge (CCB) that adds multi-instance concurrent execution and includes several upstream-unmerged LLM communication fixes. If you need to run multiple CCB sessions in the same project simultaneously, this is for you.
| Feature | Upstream CCB | CCB Multi |
|---|---|---|
| Multi-instance concurrent execution | ❌ | ✅ |
| Gemini CLI 0.29.0 compatibility | ❌ | ✅ |
Daemon work_dir decoupling |
❌ | ✅ |
| Dead-thread detection | ❌ | ✅ |
| Instance dir collision prevention | ❌ | ✅ |
Gemini CLI 0.29.0 changed session storage from SHA-256 hash to directory basename (~/.gemini/tmp/<basename>/). CCB Multi scans both formats and auto-adopts the active one, preventing session hangs.
bin/askd now accepts --work-dir (or CCB_WORK_DIR env) to decouple the daemon's project root from the launch directory. bin/ask validates the daemon's work_dir and falls back to cwd with a warning if missing.
GeminiLogReadermaintains_all_known_hashesset that survives hash format transitions- Instance mode blocks cross-hash session override to prevent contamination between projects
Changed from instance-N to inst-<hash>-N format (8-char SHA-256 of project root) to prevent cross-project collisions in Gemini CLI's basename-based storage. Old instance-N directories are still recognized for backward compatibility.
# Start instance 1 with Gemini
ccb-multi 1 gemini
# Start instance 2 with Codex (in another terminal)
ccb-multi 2 codex
# Start instance 3 with Claude (in another terminal)
ccb-multi 3 claude
# Check all instance status
ccb-multi-status
# View history
ccb-multi-history
# Clean up stale instances
ccb-multi-cleanInstances are created under .ccb-instances/ in the project root:
.ccb-instances/
inst-a1b2c3d4-1/ # inst-<projectHash>-<id>
inst-a1b2c3d4-2/
instance-3/ # Old format: still recognized
The <projectHash> is an 8-char SHA-256 of the project root path, ensuring globally unique basenames across projects.
| Variable | Description |
|---|---|
CCB_INSTANCE_ID |
Instance number (1, 2, 3, ...) |
CCB_PROJECT_ROOT |
Original project root path |
CCB_WORK_DIR |
Override daemon's working directory |
# Send async requests to multiple LLMs
CCB_CALLER=claude ask gemini "task 1" &
CCB_CALLER=claude ask codex "task 2" &
CCB_CALLER=claude ask opencode "task 3" &
wait
# Check results
pend gemini
pend codex
pend opencode# Simple list
ccb-cleanup --list
# Detailed info (work_dir, port, host)
ccb-cleanup --list -vExample output:
=== Running askd daemons ===
PID 26639 (parent 26168) - OK
Project: ad4f88fa5c5269a3
Started: 2026-02-19 10:05:35
Work Dir: /Users/user/project/.ccb-instances/instance-1
Port: 65108
Host: 127.0.0.1
# Kill by PID
ccb-cleanup --kill-pid 26639
# Interactive selection
ccb-cleanup -iInteractive mode shows a numbered list of daemons and prompts for selection with confirmation.
# Kill zombie daemons (parent process dead)
ccb-cleanup --kill-zombies
# Clean stale state files and locks
ccb-cleanup --cleanNote: The shell alias ccb-kill kills ALL CCB processes indiscriminately. Use ccb-cleanup --kill-pid for precise control.
git clone https://github.com/daniellee2015/claude_code_bridge_multi.git
cd claude_code_bridge_multi
./install.sh installThis installs the full CCB + multi-instance tooling.
If you already have upstream CCB installed and only want the multi-instance CLI:
npm install -g ccb-multiThis installs ccb-multi, ccb-multi-status, ccb-multi-history, and ccb-multi-clean globally.
Source: github.com/daniellee2015/ccb-multi
ccb update # Update to latest version
ccb uninstall # Uninstall
ccb reinstall # Clean reinstallFor core CCB usage, command reference, skills system, mail service, and platform-specific guides, see the upstream CCB README.
Key topics covered there:
ccblaunch flags (-r,-a,-h,-v)ccb.configformat- Unified command system (
ask,ccb-ping,pend) - Skills (
/all-plan,/ask,/cping,/pend) - Mail system configuration
- Windows / WSL / macOS installation guides
1.0.0 — Independent version line, forked from upstream CCB v5.2.6.
See CHANGELOG.md for details.


