harness-bridge
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@harness-bridge ask Codex to review the latest commit"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Harness Bridge
Harness Bridge connects coding-agent harnesses through MCP so one harness can query, review, explain, and delegate implementation work to another.
It currently ships two adapters:
Calling harness | Connected harness | MCP tools |
Claude Code | OpenAI Codex |
|
OpenAI Codex | Claude Code |
|
The adapter boundary keeps harness-specific execution, sessions, models, and capabilities separate while preserving a consistent set of task-oriented MCP tools.
Execution contract
Every Claude-to-Codex call runs Codex without approvals or sandboxing. The exec backend always uses--dangerously-bypass-approvals-and-sandbox; the app-server backend always uses dangerFullAccess. The codex_* MCP tools expose no sandbox argument, so callers cannot change this policy.
Only connect Harness Bridge to projects and harnesses you trust with the permissions of your user account.
Related MCP server: Codex MCP Server
Prerequisites
Claude Code CLI, installed and authenticated
OpenAI Codex CLI, installed and authenticated — version 0.147.0 or newer for the default app-server backend (older versions still work with
HARNESS_BRIDGE_CODEX_BACKEND=exec)Node.js 18 or newer
Quick start
Configure both routes and install the bundled skills and Codex teammate agent:
npx @rbutera/harness-bridge setupConfigure one route without installing extras:
npx @rbutera/harness-bridge connect claude --to codex
npx @rbutera/harness-bridge connect codex --to claudeThe compatibility forms remain available:
npx @rbutera/harness-bridge setup claude
npx @rbutera/harness-bridge setup codex
npx @rbutera/harness-bridge setup --skip-extrassetup claude means “configure Claude Code as the calling harness”; setup codex configures Codex as the caller.
Manual configuration
Claude Code calls Codex
claude mcp add codex -s user -- npx @rbutera/harness-bridge serve codexProject-local .mcp.json:
{
"mcpServers": {
"codex": {
"type": "stdio",
"command": "npx",
"args": ["harness-bridge", "serve", "codex"]
}
}
}Codex calls Claude Code
Add this to ~/.codex/config.toml:
[mcp_servers.claude]
command = "npx"
args = ["harness-bridge", "serve", "claude"]
tool_timeout_sec = 600Tools
Each adapter exposes the same task categories with a harness-specific prefix:
Task | Codex tool | Claude tool |
General query |
|
|
Code review |
|
|
Plan review |
|
|
Code explanation |
|
|
Performance planning |
|
|
Implementation |
|
|
All tools accept workingDirectory. Both adapters support deliberate multi-turn continuity, but through different parameters:
Codex tools accept an optional
threadId. Omit it to start a fresh thread; pass back thethreadIda prior call returned to continue that conversation.Claude tools accept an optional
threadKey. Omit it for independent calls; reuse a stable key to continue one conversation.
Either way, keyless (or threadId-less) calls are independent and run fully parallel; calls that continue the same conversation are serialized so two turns never race one thread.
For Codex, omit model unless a specific override is required so the current default from ~/.codex/config.toml applies.
Continuing a Codex conversation
Every Codex response that carries a thread ends with a trailing line:
threadId: 0199a1b2-c3d4-...Echo that id back on the next call to continue the same thread:
// first call — omit threadId to start fresh
{ "prompt": "Summarize the auth module." }
// response ends with: threadId: 0199a1b2-c3d4-...
// follow-up — pass the id back to continue
{ "prompt": "Now suggest a refactor.", "threadId": "0199a1b2-c3d4-..." }Thread state lives in Codex's own storage, so resume works across bridge restarts, Claude sessions, and reboots.
Bundled skills and agent
setup can install:
a
/codexskill for Claude Codea
codex-teammateagent for Claude Codea
/claudeskill for Codex-compatible agent directories
Install them individually with:
npx @rbutera/harness-bridge install skill claude --global
npx @rbutera/harness-bridge install skill codex --global
npx @rbutera/harness-bridge install agent --globalUse --local instead to install into the current project.
Configuration
Variable | Purpose | Default |
| Per-call process timeout |
|
| Retries for transient CLI failures |
|
| Enable debug logging on stderr | unset |
| Recursion depth propagated to child harnesses |
|
| Maximum simultaneous |
|
|
|
|
The previous BRIDGE_* and CODEX_BRIDGE_* names remain accepted for compatibility. New configuration should use HARNESS_BRIDGE_*.
Codex backends
The app-server backend is the default. It keeps one persistent Codex process, supports first-class threads, and can interrupt active turns. After every turn the bridge unsubscribes the thread so the app-server unloads its per-thread MCP stack while the thread stays resumable. It requires codex >= 0.147.0; a missing or too-old codex produces an actionable error naming the fix.
To opt back into the legacy codex exec backend (one subprocess per call):
HARNESS_BRIDGE_CODEX_BACKEND=exec npx @rbutera/harness-bridge serve codexThe legacy CODEX_BRIDGE_BACKEND name is also accepted, and the value app-server remains valid as an explicit no-op. Both backends use the same unrestricted execution policy. Threads created under one backend are not guaranteed to resume under the other.
Migrating from claude-codex-bridge
See MIGRATION.md for the package, command, configuration, and environment-variable changes. MCP server names and tool names are unchanged.
Development
git clone https://github.com/rbutera/harness-bridge.git
cd harness-bridge
pnpm install
pnpm checkpnpm check runs formatting, lint/type checking, all tests, the production build, and package linting.
Origin and license
Harness Bridge began from Dunqing’s claude-codex-bridge v0.3.1. The original Git history and authorship are preserved; ORIGIN.md records the lineage and subsequent divergence.
Licensed under the MIT License.
Available Tools
6 toolscodex_explain_codeCodex Explain CodeB
Ask Codex to deeply explain code, logic, or architecture. Useful for understanding unfamiliar code, onboarding, or documenting complex systems.
Inputs: target (required), depth, context, threadId, +1 more.
codex_implementCodex ImplementA
Ask Codex to implement a feature, fix a bug, or make code changes. WARNING: This modifies your codebase. Returns a summary of what was changed.
Inputs: task (required), model, threadId, workingDirectory.
codex_plan_perfCodex Performance PlanA
Ask Codex to analyze performance and create an improvement plan. Identifies bottlenecks, proposes ranked optimizations with expected impact.
Inputs: target (required), context, metrics, threadId, +2 more.
codex_queryAsk CodexB
Ask OpenAI Codex a question or give it a task. Use for getting a second opinion, exploring unfamiliar code, or tasks that benefit from a different model's perspective.
Inputs: prompt (required), model, threadId, workingDirectory.
codex_review_codeCodex Code ReviewA
Ask Codex to review code. Provide a git diff range, file paths, or a code snippet. Returns specific, actionable feedback.
Inputs: target (required), context, threadId, focusAreas, +1 more.
codex_review_planCodex Plan ReviewA
Ask Codex to critique an implementation plan. Identifies gaps, risks, missing edge cases, and suggests improvements.
Inputs: plan (required), threadId, constraints, codebasePath, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool maps to a distinct action: query, implement, explain, performance planning, code review, and plan review. The generic `codex_query` partially overlaps with `codex_explain_code` and `codex_review_code`, but the specialized tools have clearer intent, so misselection is unlikely for well-specified tasks.
All six tools use the same `codex_` prefix followed by a clear action-oriented name. The convention is fully predictable and readable across the set.
Six tools is well-scoped for a bridge that delegates work to Codex. Each tool covers a meaningfully different delegation mode, and none feels redundant.
The surface covers the main Codex workflows: questioning, implementation, explanation, performance planning, code review, and plan critique. Minor gaps exist around conversational continuation or task status/cancellation, but core use cases are well covered.
Maintenance
Related MCP Connectors
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
No-data MCP handoff for local Claude Code to Codex harness moves. $49 lifetime.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceThe self-hosted MCP bridge between Claude Chat and Claude Code.46AGPL 3.0
- AlicenseNot gradedqualityDmaintenanceIntegrates OpenAI Codex CLI with Claude Code via MCP, enabling code execution, analysis, fixing, and web search within Claude Code.1Apache 2.0
- AlicenseBqualityDmaintenanceMCP server that enables Claude Code to delegate code generation and debugging to OpenAI Codex, with stall detection and auto-recovery.2MIT
- AlicenseBqualityDmaintenanceMCP bridge for using local Claude CLI as a bounded reviewer and analysis delegate for Codex.5MIT