Real-time multi-AI collaboration: Claude, Codex & Gemini with persistent context, minimal token overhead
npx skills add https://github.com/bfly123/claude_code_bridge --skill all-planInstallez cette compétence avec la CLI et commencez à utiliser le flux de travail SKILL.md dans votre espace de travail.
Native multi-agent runtime for terminal split panes
Claude · Codex · Gemini · OpenCode · Droid
Visible concurrency, native communication, project-scoped runtime
English | Chinese

Introduction: CCB v6 is the infinite parallel agents edition. It turns split-pane collaboration into a native multi-agent runtime where agents can run side by side, hold independent roles and personalities, and delegate to each other through a stable built-in communication layer.
Parallel agents are not just "more panes on screen". In CCB, each agent can own a fully independent role, task stream, skill library, and personality.
CCB provides the runtime foundation for stable agent-to-agent communication and effectively unbounded delegation. It supports arbitrary agent naming and window arrangement, per-agent control, broadcast dispatch, and point-to-point communication.
ccb start, restore, and attach CCB in the project directory from the terminalccb -s safe modeccb -n rebuild the project .ccb stateccb kill close CCBccb kill -f deep-clean exitInside a provider / agent runtime:
/ask all "sync on the latest repo state" broadcasts one message to all live agents./ask reviewer "review the new parser change" sends work to the named [reviewer] agent.Typical pattern:
ask all for one-shot broadcast or global syncask agent_name for targeted delegationask themselves, and skills are currently auto-installed into Codex, Claude, and other providerspend and watch are secondary toolsccb is controlled by .ccb/ccb.config. That file defines agent names, pane layout, and whether an agent runs inplace or in a separate git worktree.
Quick rules:
agent_name:provider defines one agent. agent_name is also the pane label and logical runtime name.cmd adds one shell pane.; splits panes horizontally from left to right., splits panes vertically from top to bottom.inplace. If one agent needs an isolated git worktree to avoid conflicts, write agent_name:provider(worktree).Example:
cmd; writer:codex, reviewer:claude; qa:gemini(worktree)
This layout means:
cmdwriterreviewer and qaqa runs in an isolated git worktree; writer and reviewer run inplace in the main projectHistorical note: older release notes below may mention askd, legacy flags, or removed commands. Those references are kept only as changelog history and do not redefine the current CLI surface.
.codeisland/ when inherited Claude hooks call $HOME/.codeisland/..., preventing missing-hook failures inside isolated Claude homes.codeisland/ provider-state assets while still including ordinary managed Claude settings for support.ccb/agents/*/provider-state/*/home as an isolated runtime home, not the user's source home, so official browser-login credentials are copied from the real account home.claude/.credentials.json while retaining compatibility with .config/claude-code/auth.json.claude/.credentials.json, so browser-login-backed auth can be inherited into isolated CCB runtimes instead of only API-token-based settings authAfterAgent hooks that fire with an empty reply now downgrade to incomplete instead of terminalizing as a false exact completioncompleted hook artifacts with no reply text, allowing observed session-stability or timeout reliability paths to converge the request instead of accepting a blank terminal resultGOOGLE_GEMINI_BASE_URL end to end, so custom endpoint and proxy-backed Gemini CLI setups no longer fall back to Google's default production API hostGEMINI_MODEL, allowing isolated Gemini agents to keep explicit model selection instead of silently dropping it at startupkey / url shortcuts now materialize the same environment variables the current Gemini CLI actually reads, keeping explicit config-based routes aligned with shell-level env behavior.tmp/plugins/ and .tmp/plugins.sha, so isolated agents inherit the marketplace catalog and installed plugin assets they actually need instead of starting with plugin-enabled config but missing bundlescmd pane now directly execs the resolved user shell and preserves ordinary user-session transport variables such as DISPLAY, WAYLAND_DISPLAY, DBUS_SESSION_BUS_ADDRESS, XAUTHORITY, and SSH_AUTH_SOCK, improving fish/zsh and GUI-command compatibilityconfig.toml and auth.json as the sole authority for explicit key / url routes, so agent-scoped API overrides replace inherited global provider routes instead of drifting back to system configsessions/ namespaces before launch when the bound route no longer matchesccb startup now seeds tmux namespace creation from the real terminal viewport and issues a best-effort client refresh after attach so first paint matches the current terminal size without manual redrawccb update.ccb/ccb.config now accepts flat per-agent key, url, and model shortcuts so common provider overrides stay concisedist-macos-smokeccb start now reads install-scoped cached release metadata and only prompts when a newer stable release is already known locallyno server running on <project socket> as an absent namespace that must be created, instead of failing startup as a generic tmux inspect errorccb -> ping -> kill blackbox lifecycle stays coveredno server running as a recreate signal rather than a fatal inspect failureoauth_creds.json for oauth-personal reuse, and remove stale copied credentials when auth inheritance is disabledrespawn-pane now uses the same tmux ready-retry budget as namespace create/reflow, reducing transient no server running failures during startup and supervisionoauth_creds.json alongside other provider credential artifactswatch and ask wait can recover terminal results from persisted state after short daemon interruptions, while reconnect loops still honor timeout deadlineslifecycle.json, generation fencing, and namespace epoch trackingping ccbd and ping agent now report current mounted state from live authority instead of stale failure residue after recoveryccb kill and ccb kill -f now terminate non-terminal jobs during shutdown so restart cannot resurrect old executions via restore or auto-retryask -> kill -f -> restart lifecycle repro now converges cleanly to project_shutdown without lingering active execution.ccb/agents/<agent>/provider-state/....claude, .gemini, or .codex provider dotfilesccb no longer reports a false attach failure after ccb kill intentionally tears down the current project tmux session.ccb/agents/<agent>/provider-state/....claude, .gemini, or .codex provider dotfilesv6.0.1 and v6.0.2 installs can now update to the latest stable release without needing a patched local updater firstccb update now resolves the extracted release directory correctly instead of treating the .tar.gz asset name as a folderinstall.sh inside extracted release assets and completes end to end.ccb-requests/ residue so official builds are reproducibleccb ask now preserves the real originating agent so replies return to the right mailbox instead of being attributed as usercmd-anchored flowsinstall.sh now warns clearly when Homebrew is missing before users try to install tmux and other dependencies🚀 New Runtime Direction:
ccb, ccb -s, ccb -n, ccb kill, and ccb kill -f🧱 Project Rebuild Semantics:
ccb inside a pre-6 project, CCB preserves .ccb/ccb.config, removes the rest of the old .ccb runtime state, and rebuilds locally.ccb/project-runtime.json so current runtime state is distinguished from legacy state🔄 Upgrade Policy:
ccb update is available on Linux, macOS, and WSL for the 6.x lineccb update for 6.x installs the GitHub release asset, not the source archivemain branch6.0.0 requires explicit confirmation before replacing the installed runtime🤖 Provider Reliability:
🚀 User-Facing CLI Simplification:
ccb, ccb -s, ccb -n, ccb kill, and ccb kill -fask, ping, pend, and watch remain for agent-to-agent orchestration without cluttering primary help🧱 Workspace Semantics Made Explicit:
ccb.config entries now expand to workspace_mode='inplace'agent:provider(worktree) when an agent must run in its own git worktree🛠 Recovery & Reset Hardening:
ccb -n rebuilds project runtime state while keeping .ccb/ccb.configccb kill warns clearly when a worktree agent still has unmerged or dirty state🤖 Gemini Completion Fix:
🔧 Gemini CLI 0.29.0 Support:
ccb-ping and ccb-mounted gain --autostart flag to launch offline provider daemonsccb kill -f🔗 Async Communication Fixes:
CCB_DONE lines in degraded modeopencode_comm.py now matches both old hex and new timestamp-based formatsCCB_DONE marker (15s idle, configurable via CCB_GEMINI_IDLE_TIMEOUT)CCB_DONE omission rate🛠 Other Fixes:
🔧 Async Turn-Stop Fix:
Async Guardrail rule to claude-md-ccb.md — covers both /ask skill and direct Bash(ask ...) callsbin/ask now emits [CCB_ASYNC_SUBMITTED provider=xxx] matching all other provider scriptsThis fix prevents Claude from polling/sleeping after submitting async tasks.
📂 Project-Local History:
./.ccb/history/ per project@🧩 Legacy Compatibility:
.ccb_config is detected and upgraded to .ccb when possibleThese changes keep handoff artifacts scoped to the project and make upgrades smoother.
🔁 Session Switch Tracking:
.claude-session now records old_claude_session_id / old_claude_session_path with old_updated_at./.ccb/history/claude-<timestamp>-<old_id>.mdThese updates make session handoff more reliable and easier to audit.
🔧 Stability Improvements:
These improvements significantly enhance the reliability of cross-AI communication and reduce session binding failures.
This release introduced the old mail gateway path. That flow is now removed from the supported agent-first surface and remains legacy code only during cleanup.
🔧 Fixes & Improvements:
See CHANGELOG.md for full details.
🔧 Fixes & Improvements:
ccb-mounted uses ping-based detection across all platformsaskd_client falls back to CCB_RUN_DIR for daemon state filesSee CHANGELOG.md for full details.
🔧 Bug Fixes & Improvements:
See CHANGELOG.md for full details.
🚀 Unified Commands - Replace provider-specific commands with agent-first workflows:
| Old Commands | New Unified Command |
|---|---|
cask, gask, oask, dask, lask |
ccb ask <agent> [from <sender>] <message> |
cping, gping, oping, dping, lping |
ccb ping <agent|all> |
cpend, gpend, opend, dpend, lpend |
ccb pend <agent|job_id> [N] |
Supported providers: gemini, codex, opencode, droid, claude
🪟 Historical native Windows experiment:
DETACHED_PROCESSpsmux📦 New Skills:
/ask <agent> <message> - Send work to a named agent/ping <agent|all> - Check mounted agent health/pend <agent|job_id> [N] - View latest agent replySee CHANGELOG.md for full details.
ccb kill -f now cleans up orphaned tmux sessions globally (sessions whose parent process has exited)pgrep for daemon detection (~4x faster), extracted to standalone ccb-mounted scriptdroid_skills/install_droid_skills() to install Droid skills to ~/.droid/skills/ccb_ask_* plus cask/gask/lask/oask aliases).ccb droid setup-delegation command for MCP registration.droid is detected (opt-out via env).Usage:
/all-plan <requirement>
Example:
/all-plan Design a caching layer for the API with Redis
Highlights:
ccb up; use ccb ... or the default ccb.config.ccb.config when missing.
oask to delegate sub-tasks to OpenCode models.| Feature | Codex | Gemini | OpenCode |
|---|---|---|---|
| Parallel Queue | ✅ | ✅ | ✅ |
| Interruption Awareness | ✅ | ✅ | - |
| Response Isolation | ✅ | ✅ | ✅ |
Scenario 1: Claude & Codex Concurrent Access to OpenCode
Both agents firing requests simultaneously, perfectly coordinated by the daemon.
| Source | Task | Result | Status |
|---|---|---|---|
| 🤖 Claude | CLAUDE-A |
CLAUDE-A | 🟢 |
| 🤖 Claude | CLAUDE-B |
CLAUDE-B | 🟢 |
| 💻 Codex | CODEX-A |
CODEX-A | 🟢 |
| 💻 Codex | CODEX-B |
CODEX-B | 🟢 |
Scenario 2: Recursive/Chained Calls
Codex autonomously driving OpenCode for a 5-step workflow.
| Request | Exit Code | Response |
|---|---|---|
| ONE | 0 |
CODEX-ONE |
| TWO | 0 |
CODEX-TWO |
| THREE | 0 |
CODEX-THREE |
| FOUR | 0 |
CODEX-FOUR |
| FIVE | 0 |
CODEX-FIVE |
Step 1: Use a tmux-capable environment (tmux on Linux/macOS/WSL)
Step 2: Choose installer based on your environment:
git clone https://github.com/bfly123/claude_code_bridge.git
cd claude_code_bridge
./install.sh install
git clone https://github.com/bfly123/claude_code_bridge.git
cd claude_code_bridge
./install.sh install
Note: If commands not found after install, see macOS Troubleshooting.
Use this if your Claude/Codex/Gemini runs in WSL.
⚠️ WARNING: Do NOT install or run ccb as root/administrator. Switch to a normal user first (
su - usernameor create one withadduser).
# Run inside WSL terminal (as normal user, NOT root)
git clone https://github.com/bfly123/claude_code_bridge.git
cd claude_code_bridge
./install.sh install
Use this if your Claude/Codex/Gemini runs natively on Windows.
Native Windows mux runtime is being redesigned around
psmux. The stable split-pane path in this branch is still Linux/macOS/WSL +tmux.
git clone https://github.com/bfly123/claude_code_bridge.git
cd claude_code_bridge
powershell -ExecutionPolicy Bypass -File .\install.ps1 install
pwsh.exe (PowerShell 7+) when available, otherwise powershell.exe.ccb # Start default agents from .ccb/ccb.config
ccb -s # Safe start: keep configured/manual permission behavior
ccb -n # Rebuild .ccb except ccb.config, then start fresh
ccb kill # Stop this project's background runtime
ccb kill -f # Force cleanup before rebuilding state
tmux tip: CCB's tmux status/pane theming is enabled only while CCB is running.
tmux tip: press `Ctrl+b` then `Space` to cycle tmux layouts. You can press it repeatedly to keep switching layouts.
Layout rule: the last selected agent runs in the current pane. Extras are ordered by the selected target list; the first extra goes to the top-right, then the left column fills top-to-bottom, then the right column fills top-to-bottom.
Note: `ccb up` is removed; use `ccb ...` with `.ccb/ccb.config`.
| Flag | Description | Example |
|---|---|---|
-s |
Safe start; disable CLI auto-permission override | ccb -s |
-n |
Rebuild .ccb except ccb.config, then start fresh |
ccb -n |
-h |
Show help information | ccb -h |
-v |
Show version and check for updates | ccb -v |
Default lookup order:
.ccb/ccb.config (project)~/.ccb/ccb.config (global)Compact format only:
writer:codex,reviewer:claude
Enable cmd pane (default title/command):
agent1:codex,agent2:codex,agent3:claude,cmd
Rules:
agent_name:provider.cmd is a reserved standalone token for the shell pane, not an agent name.; splits panes horizontally from left to right., splits panes vertically from top to bottom.(...) groups part of the layout explicitly.target='.', workspace_mode='inplace', restore='auto', permission='manual'.agent_name:provider(worktree) when you want that agent isolated in its own git worktree.codex:codex,claude:claude.CCB v6 currently supports ccb update on Linux, macOS, and WSL. A major upgrade fully replaces the installed runtime. On the first ccb inside an older project, CCB preserves .ccb/ccb.config, clears the rest of the old .ccb state, and rebuilds locally.
If you installed from a git checkout with ./install.sh install, that install now runs in source dev mode:
ccb and ask link back to the checkout instead of using a copied snapshotgit pull or by switching commits, then rerun ./install.sh installccb update to install the latest stable release and repoint global ccb links to the managed release installccb update # Update to the latest stable release
ccb update 6 # Update to the highest v6.x.x version
ccb update 6.0 # Update to the highest v6.0.x version
ccb update 6.0.5 # Update to a specific version
ccb uninstall # Uninstall ccb and clean configs
ccb reinstall # Clean then reinstall ccb
Key Point:
ccband the underlying agent CLIs must run in the same environment. The most common issue is environment mismatch causing project startup or agent attach to fail.
Note: The installers also install OS-specific SKILL.md variants for Claude/Codex skills:
SKILL.md.bash)SKILL.md.powershell)tmux only.tmux.psmux; see docs/ccbd-windows-psmux-plan.md.Determine based on how you installed/run Claude Code/Codex:
WSL Environment
bash (e.g., curl ... | bash, apt, pip, npm)/home/<user>/... and you may see /mnt/c/...cat /proc/version | grep -i microsoft has output, or echo $WSL_DISTRO_NAME is non-emptyNative Windows Environment
winget, PowerShell scripts)C:\Users\<user>\...ccb and all agent CLIs inside WSL, then use tmux.psmux lands.ccb Not Starting Correctlytmux in the environment where you run ccbIf ccb is not found after running ./install.sh install:
Cause: The install directory (~/.local/bin) is not in your PATH.
Solution:
# 1. Check if install directory exists
ls -la ~/.local/bin/
# 2. Check if PATH includes the directory
echo $PATH | tr ':' '\n' | grep local
# 3. Check shell config (macOS defaults to zsh)
cat ~/.zshrc | grep local
# 4. If not configured, add manually
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
# 5. Reload config
source ~/.zshrc
If a shell started inside tmux cannot find ccb commands but a regular Terminal can:
~/.zprofile as well:echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zprofile
Then restart the tmux server completely:
tmux kill-server
Once started, collaborate naturally. Claude will detect when to delegate tasks.
Common Scenarios:
main.py.""Let Claude, Codex and Gemini play Dou Di Zhu! You deal the cards, everyone plays open hand!"
🃏 Claude (Landlord) vs 🎯 Codex + 💎 Gemini (Farmers)
Note: The public project runtime workflow in CCB v6 is intentionally small:
ccb,ccb -s,ccb -n,ccb kill, andccb kill -f. Internal control-plane commands still exist for agent-side orchestration, but they are not part of the user-facing startup/reset surface.
The public project runtime workflow in CCB v6 is intentionally reduced to five primary commands:
ccb - Default start path; launch agents defined by .ccb/ccb.configccb -s - Safe start; keep each agent's configured/default permission behaviorccb -n - Rebuild project .ccb state except ccb.config, then start fresh with confirmationccb kill - Stop the current project's runtimeccb kill -f - Force cleanup project-owned runtime residue before ccb -n
.ccb exists but ccb.config is missing or staleInternal control-plane commands still exist for model-side orchestration and automation, but they are intentionally not presented here as public user commands.
tmux as terminal backendpsmux; this branch no longer ships a parallel legacy native backendclaude/codex/droid)CCB_COMPLETION_HOOK_ENABLED is setUsage:
/all-plan <requirement>
Example:
/all-plan Design a caching layer for the API with Redis
How it works:
Key features:
When to use:
The legacy mail subsystem has been removed from the repo. The current runtime is project-scoped around .ccb/ccb.config, and old runtime state can be cleared and rebuilt.
Combine with editors like Neovim for seamless code editing and multi-model review workflow. Edit in your favorite editor while AI assistants review and suggest improvements in real-time.
tmuxccb uninstall
ccb reinstall
# Fallback:
./install.sh uninstall
Stable runtime: Linux/macOS/WSL + tmux
Native Windows mux: planned around psmux
Join our community
📧 Email: [email protected]
💬 WeChat: seemseam-com
ccb kill -f cleans up orphaned tmux sessions globallypgrep, extracted to ccb-mounted scriptdroid_skills/ccb_ask_* and cask/gask/lask/oask) plus ccb droid setup-delegation for MCP install-r 恢复在多项目切换后失效的问题/all-plan with Superpowers brainstorming + availability gating; Codex lping/lpend added; gask keeps brief summaries with CCB_DONE..autoflow/roles.json (supports _meta.name) and caches per path.references/) for Claude/Codex installs.ccb uninstall / ccb reinstall with Claude config cleanup..ccb anchor; avoid cross-project Claude session mismatches).ccb up; default ccb.config is auto-created when missingsandbox_mode = "full-auto" to "danger-full-access" to fix Codex startupremain-on-exit was set$TMUX_PANE env var) and better fallback when split targets disappeartmux for auto-launch; removed error-prone auto-attach logic--print-version flag for fast version checks-a) when relaunching ccb in tmuxcask/gask/oask prints a post-submit guardrail reminder for Claude--sync to suppress guardrail prompts for Codex callersoask/gask skills to wait silently with --syncccb_project_id uses current-directory .ccb/ anchor (no ancestor traversal, no git dependency)oask/gask skills default to waiting (--timeout -1) to avoid sending the next task too early.codex-session log paths by parsing start_cmd and scanning latest logsxsel support and update-environment for better clipboard integration across GUI/remote sessionscping/gping/oping/cpend/opend support --session-file / CCB_SESSION_FILE to bypass wrong cwdgpend supports --session-file / CCB_SESSION_FILE to bypass wrong cwd[projects.\"...\"] entries in ~/.codex/config.toml before starting Codex.ccb/ (fallback to legacy root dotfiles)cask/gask/oask support --session-file / CCB_SESSION_FILE to bypass wrong cwdoask to drive OpenCode-a flag