codex-agent-bridge
Agent Bridge
Codex 监督 Claude Code 和 DeepSeek Harness。Bridge 自己不调用 LLM。
Let Codex be the only supervisor. Claude Code or DeepSeek Harness does the implementation. You review, verify, and apply in Codex.
What it is
Codex 负责计划、审核、approve / apply。外部 Coding Agent 只在独立 worktree 里改代码。Bridge 不调用任何 LLM,也不替你选 model / provider / effort。
Codex ──bridge_run──► Claude Code / DeepSeek Harness
▲ │
│ ReviewPacket │ 在独立 worktree 里改代码
│ verification │ 不得 commit / push / merge
└──── bridge_apply ◄──────┘Related MCP server: cc-agent
Features
MCP 工具:
bridge_run→respond→review→approve→applyWorker 在独立 git worktree 干活,不得 commit / push / merge
独立 verification,不信 Worker 自称测过
ReviewDigest、checkpoint、CAS、guarded cherry-pick
doctor自检:缺什么、为什么、怎么修
Quick Start
别人看到 README 后按这五步走,不用翻文档。
1. Install
需要 Node.js 22+ 和 Git。
npx -y codex-agent-bridge这条命令会:把运行时装到 ~/.agent-bridge,写入 Codex Skill 和 MCP(用本机 node.exe,不用 npx.cmd),并跑一次 doctor。
更新再跑同一条。卸载:
npx -y codex-agent-bridge uninstall
npx -y codex-agent-bridge uninstall --purge2. Configure Claude or DeepSeek
Bridge 不安装 Worker,也不改它们的 model / provider / reasoning effort。你至少要有一个已经能独立登录、独立干活的 Worker:
Worker | 你要先做好 |
Claude Code | 本机已安装并完成登录 |
DeepSeek Harness | 本机已能独立跑;legacy ACP 需要源码树或 |
Agent Bridge不管理DeepSeek model/provider/reasoning effort。DeepSeek effective route由运行中的Harness ACP composition决定。当前legacy integration使用上游composition配置。Claude Code 沿用其原生配置。
3. Run doctor
npx -y codex-agent-bridge doctor
npx -y codex-agent-bridge doctor --project /path/to/your/git-repo成功时会看到:
✓ Agent Bridge installed
✓ Git available
✓ Claude ACP available
✓ DeepSeek ACP legacy available
✓ Workspace ready某一项是 ✗ 时,doctor 会写:缺少什么、为什么、怎么解决。不要忽略 Fix: 行。
4. Connect the MCP client
安装后新开一轮 Codex。旧会话看不到新的 bridge_* 工具。
MCP 已由安装器写入 ~/.codex/config.toml。不要手写 npx.cmd。
5. First task
目标必须是独立 git 仓库。每次 bridge_* 都带同一个 project。任务 UUID 字段名是 task。
bridge_run worker=claude 或 deepseek
→ WAITING_FOR_INPUT 时 bridge_respond
→ AWAITING_REVIEW + ReviewPacket
→ bridge_approve 任务分支 checkpoint,不是完成发布
→ bridge_apply cherry-pick 到当前分支,不是 mergeTurn 结束 ≠ 任务完成。Diff 只认 baseCommit vs worktree。bridge_run 只选 worker,不要传 model / provider / effort。
项目里如果有 .agent-bridge/verify.json,默认会跑其中全部 verifyId。示例:templates/verify.json。
Architecture
Codex (Supervisor)
│ MCP stdio
▼
Agent Bridge
├── TaskManager / worktree / verification / review
├── checkpoint + CAS + guarded apply
└── WorkerProfile → AcpRuntimeDriver
├── Claude official ACP
└── DeepSeek legacy source ACP更细的说明:
产品路线 | |
Codex 怎么接 | |
为什么走 npm、不走 EXE | |
为什么不做 HTTP/GUI | |
DeepSeek 官方 automation 边界 | docs/decisions/ADR-004-deepseek-official-automation-boundary.md |
Limitations
DeepSeek 当前是 legacy source ACP,不是官方 Product runtime。官方 ACP runtime 迁移等上游补入口,见 ADR-004。
同一项目同一时刻只能有一个 Writer。第二写者返回
CORE_LOCK_HELD。损坏的
tasks.json会TASK_STORE_CORRUPTED,不会当成空库。没有 GUI、HTTP daemon、SQLite。审核面在 Codex。
V1 不管理 Worker 的 model / provider / effort。
从源码开发
npm install
npx tsx src/cli.ts setup --dev
npm test--dev 让 MCP 指向当前仓库,而不是 ~/.agent-bridge。
License
Apache-2.0. See LICENSE.
Roadmap: ROADMAP.md. Changes: CHANGELOG.md.
发布新版本
本地 npm publish 每次都会要 2FA。正确做法是:改版本 → 打 tag → push,GitHub Actions 用 Trusted Publishing 发 npm。
仓库目录可能仍叫 Agent Relay。产品名是 Agent Bridge。npm 包名是 codex-agent-bridge。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
MCP server for Serena — tasks, notes & projects from Claude, Codex, Cursor & ChatGPT.
MCP server for the GitCore API, enabling AI agents to interact with GitCore repositories, issues, pull requests, and more.
An MCP server that gives your AI access to the source code and docs of all public github repos
Related MCP Servers
- AlicenseAqualityCmaintenanceA local MCP server that lets Claude delegate scoped work to Codex with structured results and guardrails, supporting planning, code review, build, reverse engineering, and long-running background tasks.11MIT
- AlicenseAqualityDmaintenanceMCP server that spawns autonomous Claude Code agents in GitHub repos, enabling task delegation with persistent state, multi-step workflows, and job monitoring.47168 npm2Apache 2.0
- AlicenseNot gradedqualityDmaintenanceAn MCP server that lets ChatGPT or any MCP client securely delegate coding tasks to a local Claude Code instance, with git checkpointing, approval gates, and structured results. Supports code review, test running, and rollback via simple tool calls.MIT
- AlicenseAqualityDmaintenanceAn MCP server that lets OpenAI Codex delegate tasks to Google Gemini agents as isolated background workers, with Git worktree isolation, loop detection, and security boundary enforcement.72MIT