Silky Smooth Claude & Codex & Gemini Collaboration via Split-Pane Terminal
Build a real AI expert team. Give Claude Code / Codex / Gemini / OpenCode partners that never forget.
English | 中文

Introduction: Multi-model collaboration effectively avoids model bias, cognitive blind spots, and context limitations. However, MCP, Skills and other direct API approaches have many limitations. This project offers a new solution.
| Feature | Benefit |
|---|---|
| 🖥️ Visual & Controllable | Multiple AI models in split-pane CLI. See everything, control everything. |
| 🧠 Persistent Context | Each AI maintains its own memory. Close and resume anytime (-r flag). |
| 📉 Token Savings | Sends lightweight prompts instead of full file history. |
| 🪟 Native Workflow | Integrates directly into WezTerm (recommended) or tmux. No complex servers required. |
Rebuilt for tmux-first, terminal-agnostic workflows
- Full Refactor: Cleaner architecture and more predictable behavior across environments.
- Perfect tmux Support: Stable splits, pane labels, borders, and session-scoped theming that restores on exit.
- Works in Any Terminal: If your terminal can run tmux, CCB can provide the full multi-model split experience (except native Windows, where tmux is still recommended via WSL/WezTerm).
The Ultimate Bridge for Cross-AI Collaboration
v3.0 brings a revolutionary architecture change with Smart Daemons, enabling parallel execution, cross-agent coordination, and enterprise-grade stability.
- 🔄 True Parallelism: Submit multiple tasks to Codex, Gemini, or OpenCode simultaneously. The new daemons (
caskd,gaskd,oaskd) automatically queue and execute them serially, ensuring no context pollution. - 🤝 Cross-AI Orchestration: Claude and Codex can now simultaneously drive OpenCode agents. All requests are arbitrated by the unified daemon layer.
- 🛡️ Bulletproof Stability: Daemons are self-managing—they start automatically on the first request and shut down after 60s of idleness to save resources.
- ⚡ Chained Execution: Advanced workflows supported! Codex can autonomously call
oaskto delegate sub-tasks to OpenCode models. - 🛑 Smart Interruption: Gemini tasks now support intelligent interruption detection, automatically handling stops and ensuring workflow continuity.
| Feature | caskd (Codex) | gaskd (Gemini) | oaskd (OpenCode) |
|---|---|---|---|
| Parallel Queue | ✅ | ✅ | ✅ |
| Interruption Awareness | ✅ | ✅ | - |
| Response Isolation | ✅ | ✅ | ✅ |
📊 View Real-world Stress Test Results
Scenario 1: Claude & Codex Concurrent Access to OpenCodeBoth 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 CallsCodex 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 |
Unlock the full potential of ccb with CCA — an advanced workflow automation system built on top of this bridge.
- Workflow Automation: Intelligent task assignment and automated state management.
- Seamless Integration: Native support for the v3.0 daemon architecture.
Install via CCB:
ccb update ccaStep 1: Install WezTerm (native .exe for Windows)
Step 2: Choose installer based on your environment:
Linux
git clone https://github.com/bfly123/claude_code_bridge.git
cd claude_code_bridge
./install.sh installmacOS
git clone https://github.com/bfly123/claude_code_bridge.git
cd claude_code_bridge
./install.sh installNote: If commands not found after install, see macOS Troubleshooting.
WSL (Windows Subsystem for Linux)
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 installWindows Native
Use this if your Claude/Codex/Gemini runs natively on Windows.
git clone https://github.com/bfly123/claude_code_bridge.git
cd claude_code_bridge
powershell -ExecutionPolicy Bypass -File .\install.ps1 installccb up codex # Start Codex
ccb up gemini # Start Gemini
ccb up opencode # Start OpenCode
ccb up codex gemini # Start both
ccb up codex gemini opencode # Start all three (spaces)
ccb up codex,gemini,opencode # Start all three (commas)
tmux tip: CCB's tmux status/pane theming is enabled only while CCB is running.ccb-layout # Start 2x2 layout (Codex+Gemini+OpenCode)| Flag | Description | Example |
|---|---|---|
-r | Resume previous session context | ccb up codex -r |
-a | Auto-mode, skip permission prompts | ccb up codex -a |
-h | Show help information | ccb -h |
-v | Show version and check for updates | ccb -v |
ccb update # Update ccb to the latest versionKey Point:
ccb/cask/cping/cpendmust run in the same environment ascodex/gemini. The most common issue is environment mismatch causingcpingto fail.
- Install Windows native WezTerm (
.exefrom official site or via winget), not the Linux version inside WSL. - Reason:
ccbin WezTerm mode relies onwezterm clito manage panes.
Determine based on how you installed/run Claude Code/Codex:
WSL Environment
- You installed/run via WSL terminal (Ubuntu/Debian) using
bash(e.g.,curl ... | bash,apt,pip,npm) - Paths look like:
/home/<user>/...and you may see/mnt/c/... - Verify:
cat /proc/version | grep -i microsofthas output, orecho $WSL_DISTRO_NAMEis non-empty
- You installed/run via WSL terminal (Ubuntu/Debian) using
Native Windows Environment
- You installed/run via Windows Terminal / WezTerm / PowerShell / CMD (e.g.,
winget, PowerShell scripts) - Paths look like:
C:\Users\<user>\...
- You installed/run via Windows Terminal / WezTerm / PowerShell / CMD (e.g.,
Edit WezTerm config (%USERPROFILE%\.wezterm.lua):
localwezterm=require'wezterm'return {
default_domain='WSL:Ubuntu', -- Replace with your distro name
}Check distro name with wsl -l -v in PowerShell.
- Most common: Environment mismatch (ccb in WSL but codex in native Windows, or vice versa)
- Codex session not running: Run
ccb up codexfirst - WezTerm CLI not found: Ensure
weztermis in PATH - Terminal not refreshed: Restart WezTerm after installation
If ccb, cask, cping commands are 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 directoryecho$PATH| tr ':''\n'| grep local# 3. Check shell config (macOS defaults to zsh)
cat ~/.zshrc | grep local# 4. If not configured, add manuallyecho'export PATH="$HOME/.local/bin:$PATH"'>>~/.zshrc
# 5. Reload configsource~/.zshrcIf WezTerm cannot find ccb commands but regular Terminal can:
- WezTerm may use a different shell config
- Add PATH to
~/.zprofileas well:
echo'export PATH="$HOME/.local/bin:$PATH"'>>~/.zprofileThen restart WezTerm completely (Cmd+Q, reopen).
Once started, collaborate naturally. Claude will detect when to delegate tasks.
Common Scenarios:
- Code Review:"Have Codex review the changes in
main.py." - Second Opinion:"Ask Gemini for alternative implementation approaches."
- Pair Programming:"Codex writes the backend logic, I'll handle the frontend."
- Architecture:"Let Codex design the module structure first."
- Info Exchange:"Fetch 3 rounds of Codex conversation and summarize."
"Let Claude, Codex and Gemini play Dou Di Zhu (斗地主)! You deal the cards, everyone plays open hand!"
🃏 Claude (Landlord) vs 🎯 Codex + 💎 Gemini (Farmers)
Note: Manual commands (like
cask,cping) are usually invoked by Claude automatically. See Command Reference for details.
| Command | Description |
|---|---|
/cask <msg> | Background mode: Submit task to Codex, free to continue other tasks (recommended) |
cpend [N] | Fetch Codex conversation history, N controls rounds (default 1) |
cping | Test Codex connectivity |
| Command | Description |
|---|---|
/gask <msg> | Background mode: Submit task to Gemini |
gpend [N] | Fetch Gemini conversation history |
gping | Test Gemini connectivity |
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.
- Python 3.10+
- Terminal:WezTerm (Highly Recommended) or tmux
./install.sh uninstallWindows fully supported (WSL + Native via WezTerm)
Join our community
📧 Email: bfly123@126.com 💬 WeChat: seemseam-com

Version History
- Full Refactor: Rebuilt from the ground up with a cleaner architecture
- Perfect tmux Support: First-class splits, pane labels, borders and statusline
- Works in Any Terminal: Recommended to run everything in tmux (except native Windows)
- Smart Daemons:
caskd/gaskd/oaskdwith 60s idle timeout & parallel queue support - Cross-AI Collaboration: Support multiple agents (Claude/Codex) calling one agent (OpenCode) simultaneously
- Interruption Detection: Gemini now supports intelligent interruption handling
- Chained Execution: Codex can call
oaskto drive OpenCode - Stability: Robust queue management and lock files
- Fix oask session tracking bug - follow new session when OpenCode creates one
- Simplify CCA detection: check for
.autoflowfolder in current directory - Plan mode enabled for CCA projects regardless of
-aflag
- Per-directory lock: different working directories can run cask/gask/oask independently
- Add non-blocking lock for cask/gask/oask to prevent concurrent requests
- Unify oask with cask/gask logic (use _wait_for_complete_reply)
- Fix plan mode conflict with auto mode (--dangerously-skip-permissions)
- Fix oask returning stale reply when OpenCode still processing
- Auto-enable plan mode when CCA (Claude Code Autoflow) is installed
- Simplify cping.md to match oping/gping style (~65% token reduction)
- Optimize skill files: extract common patterns to docs/async-ask-pattern.md (~60% token reduction)
- Fix race condition in gask/cask: pre-check for existing messages before wait loop
