codex-claude-bridge
Uses OpenAI Codex to perform code and plan reviews, returning verdicts, findings, and session continuity across reviews.
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., "@codex-claude-bridgeReview the changes I just made."
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.
Claude Review Bridge — Codex + Gemini
MCP server for automated code review. Claude Code writes the code; a second model reviews it and structured feedback comes back inline, no copy-pasting between tools. The reviewer is OpenAI Codex by default, or Google Gemini (via the Antigravity agy CLI).
Works with a subscription you already have — $0 marginal cost. Codex runs on your ChatGPT plan; Gemini runs on your Google AI Pro plan.
Out of usage on one provider? When both are set up, the bridge automatically fails over to the other so a review still comes back — see Provider failover.
Quick Start
Add the MCP server to Claude Code (same for every provider):
claude mcp add codex-bridge -- npx -y codex-claude-bridge@latestThen set up at least one reviewer. Codex is the default; set up both and the bridge fails over between them automatically.
Codex (default) — your ChatGPT subscription
Install the Codex CLI and sign in:
npm install -g @openai/codex
codex loginThe SDK reads OAuth tokens from ~/.codex/auth.json (created by codex login); when no OPENAI_API_KEY is set it uses your ChatGPT subscription automatically. To pay per token instead, export OPENAI_API_KEY=sk-....
Gemini — your Google AI Pro subscription
Install the Antigravity (agy) CLI, then run it once to sign in with your Google account (AI Pro):
agy # first run prompts a Google sign-inSelect Gemini with a .reviewbridge.json at your project root:
{ "provider": "gemini" }Restart Claude Code after setup. The review tools are now available.
Prerequisites
Node.js 18+ — nodejs.org
Claude Code — code.claude.com
Codex CLI (Codex path) —
npm install -g @openai/codex, thencodex loginAntigravity
agyCLI (Gemini path) — install it, then runagyto sign in (Google AI Pro)
Related MCP server: mcp-agent-review
What You Get
Once set up, Claude Code gains five new tools:
review_plan— Send an implementation plan for architectural review. Get a verdict (approve / revise / reject) with specific findings.review_code— Send a code diff for review. Get findings with file and line references.review_precommit— Quick sanity check before committing. Automatically captures your staged git changes.review_status— Check whether a review is still in progress, completed, or failed.review_history— Look up past reviews by session or count.
All successful review calls return structured JSON with models[] (the providers/models that
contributed) and provenance (whether the result was durably recorded, memory-only, or synthetic).
Responding-model evidence
Each models[] entry reports:
{
"provider": "codex",
"role": "review",
"requested": null,
"resolved": "gpt-6-astra",
"observed": "gpt-6-astra",
"evidence": "runtime_session_record"
}requestedis the per-call/config selector considered for the turn. It isnullfor provider defaults and Codex resumes where no model override is applied.resolvedis the concrete label selected or retained by the bridge.observedis a runtime-recorded label when one is available. Codex reads it from its local session record; Gemini reports the modelagynamed in its owninitevent for a run made by this server process, andnullfor a session this process did not run. A mismatch betweenresolvedandobservedis logged on stderr.roledistinguishes normal review turns from deliberate-deep adjudication turns.evidencesays whether identity came from a runtime session record, bridge selection, or was unavailable.
This is control-plane evidence about the model labels selected and recorded by the clients. It is
not cryptographic proof of underlying weights or an audit of a provider's internal routing.
models[] lists successful contributors, not every provider that received input, so it is not a
data-egress audit.
Usage (MCP)
In Claude Code, just describe what you want reviewed. Claude Code will pick the right tool:
Plan review:
"Review this implementation plan before I start coding." "Check my plan for security issues and scalability risks."
Code review:
"Review the changes I just made." (Claude Code runs
git diffand passes it) "Review this diff for bugs and security issues."
Pre-commit check:
"Run a pre-commit check on my staged changes." "Check if these changes are safe to commit."
Session continuity — pass the session_id from a plan review into a code review to maintain context across the full review lifecycle.
Standalone CLI
Run reviews directly from the terminal — no MCP setup required.
Pre-commit check (auto-captures staged changes):
npx codex-claude-bridge@latest review-precommitBlock commits on issues (CI-friendly, exits 2 on blockers):
npx codex-claude-bridge@latest review-precommit && git commitReview a plan:
npx codex-claude-bridge@latest review-plan --plan plan.mdReview a diff:
git diff main | npx codex-claude-bridge@latest review-code --diff -Review a branch or landed commits (no pasted diff, no scratch worktree):
npx codex-claude-bridge@latest review-code --base main # main..HEAD
npx codex-claude-bridge@latest review-code --base v1.2.0 --head v1.3.0Review another checkout or worktree:
npx codex-claude-bridge@latest review-precommit --cwd ../app/.worktrees/feature-x--cwd picks the repository being reviewed: it decides where git captures from, which repository
instruction files apply, and where the reviewer runs. Relative paths resolve against your current
directory. It does not change how --plan, --diff, or --config are resolved — those stay
relative to where you ran the command.
Add --json to any command for raw JSON output. Use --help to see all options.
Tools Reference
review_plan
Send an implementation plan for architectural/feasibility review.
Parameter | Type | Required | Description |
| string | yes | The implementation plan to review |
| string | no | Absolute path to the directory this review runs in — the repository or git worktree being reviewed. Omit to use the directory the server was started in. Not expanded for |
| string | no | Project context and constraints |
| string[] | no | Review focus areas (e.g. |
|
| no | Review depth |
| string | no | Continue from a previous review session |
| string | no | Override the model for this call (e.g. |
Returns: { verdict, summary, findings[], session_id, models[], provenance }
review_code
Send a code diff for code review.
Parameter | Type | Required | Description |
| string | no | Git diff to review. Omit to auto-capture |
| string | no | Review a committed range instead: the ref to diff from (e.g. |
| string | no | The ref to diff to when |
| string | no | Absolute path to the directory this review runs in — the repository or git worktree being reviewed. Auto-capture, repository instruction files, and the reviewer subprocess all use it. Required for auto-capture unless |
| boolean | no | Auto-capture working-tree changes via |
| string | no | Intent of the changes |
| string | no | Continue from previous review (e.g. plan review session) |
| string[] | no | Review criteria (e.g. |
| string | no | Override the model for this call (e.g. |
Returns: { verdict, summary, findings[], session_id, models[], provenance }, plus captured_from
when the diff was auto-captured or taken from a base/head range.
Findings include file and line references when available.
review_precommit
Quick pre-commit sanity check. Auto-captures staged git changes by default.
Parameter | Type | Required | Description |
| boolean | no | Auto-capture |
| string | no | Explicit diff instead of auto-capture |
| string | no | Absolute path to the directory this review runs in — the repository or git worktree being reviewed. Auto-capture, repository instruction files, and the reviewer subprocess all use it. Required for auto-capture unless |
| string | no | Continue from previous review |
| string[] | no | Custom pre-commit checks |
| string | no | Override the model for this call (e.g. |
Returns: { ready_to_commit, blockers[], warnings[], session_id, models[], provenance }, plus
captured_from when the diff was auto-captured.
Choosing the directory to review (cwd)
One server can review several repositories. Pass cwd — an absolute path — and that directory
decides everything about where the review happens:
which repository
auto_diff/review_precommitcapture from,which
.github/copilot-instructions.mdand.github/instructions/*.instructions.mdapply,which directory the reviewer subprocess itself runs in.
Omit cwd and the bridge uses the directory the MCP client launched the server in. That default is
frequently not where you are working — a git worktree, a second checkout, or an agent driving work
in another repository all end up somewhere else — which is exactly what cwd is for.
// review the worktree, not wherever the server happens to have been started
{ "cwd": "/Users/me/code/app/.worktrees/feature-x" }Rules:
Absolute only. A relative path would resolve against the server's directory, which is the confusion this parameter removes.
~is not expanded.Per call.
cwdis not stored on the session. Pass it again on every call, including resumes.Symlinks are fine — the path is canonicalized with
realpath, so worktrees reached through a symlink work.A missing path, a broken symlink, a file, or a directory that cannot be read returns
INVALID_INPUTbefore any reviewer is contacted.review_planand explicit-diff reviews work in any readable directory. Auto-capture needs a git work tree: pointing it at a plain directory returnsINVALID_INPUTrather than silently reviewing nothing.Capture is anchored at the repository root, so a subdirectory still reviews the whole repository — the same thing
git diffdoes from a subdirectory.
The CLI takes the same option as --cwd <path>, where relative paths resolve against your shell's
current directory. It does not rebase --plan, --diff, or --config, which stay relative to
where you ran the command.
Where the diff came from
Auto-captured results (review_code without a diff, review_precommit without a diff) carry
captured_from: the absolute directory the bridge ran git in — the repository root of the resolved
cwd, or of the server's launch directory when you passed none. It is the answer to "which
repository is this review actually about", and it is worth checking whenever a result surprises you:
an empty result means "nothing staged there", not "nothing staged".
Empty auto-captures say so explicitly — No staged changes found in /path/to/repo — and git failures
append capture attempted from "/path/to/repo". If captured_from is not the repository you meant,
pass cwd, or supply the diff yourself:
git diff --staged | <your client's review_precommit with an explicit diff>Explicit diffs never carry captured_from — even when the bridge resolved a repository for them —
and the field is never persisted to review history or shown to the reviewer.
review_status
Check status of a review session.
Parameter | Type | Required | Description |
| string | yes | Session ID to check |
Returns: { status, session_id, elapsed_seconds }
review_history
Query past reviews.
Parameter | Type | Required | Description |
| string | no | Query reviews for a specific session |
| number | no | Return 1–100 reviews (default: 10 recent; 100 for a session) |
| string | no | Decimal row cursor returned as |
Returns: { reviews[], next_cursor }. Recent pages are newest-first; session pages are oldest-first.
Each entry includes models plus model_metadata_status (recorded, legacy_unrecorded, or
invalid). Legacy rows are never backfilled from today's defaults, and malformed stored metadata
is returned as models: null.
Configuration
Create .reviewbridge.json in your project root to customize review behavior:
{
"provider": "codex",
"fallback": true,
"model": "gpt-6-astra",
"reasoning_effort": "medium",
"timeout_seconds": 300,
"max_chunk_tokens": 8000,
"review_standards": {
"plan_review": {
"focus": ["architecture", "feasibility"],
"depth": "thorough"
},
"code_review": {
"criteria": ["bugs", "security", "performance", "style"],
"require_tests": true
},
"precommit": {
"auto_diff": true,
"block_on": ["critical", "major"]
}
},
"project_context": "Your project description and constraints."
}All fields are optional. Missing fields use the defaults shown above. Large diffs are automatically split into chunks of approximately max_chunk_tokens tokens and reviewed sequentially. review_code and review_precommit results report chunks_reviewed (how many reviewer calls ran) and, when the diff was split, chunk_files — the files each chunk held, in order — so you can tell whether any single call saw two files together.
provider—"codex"(default) or"gemini". Selects which backend reviews.mode—"failover"(default),"single","deliberate", or"deliberate-deep". Picks how the two providers combine; see Provider failover and Deliberation. When unset it's derived fromfallback.fallback—true(default) auto-fails-over to the other provider when the configured one is out of usage or unavailable. Setfalse(equivalently"mode": "single") for strict single-provider behavior.require_cwd—true(default) refuses an MCPreview_code/review_precommitcall that would auto-capture a diff withoutcwd, returningINVALID_INPUTinstead of capturing from the server's launch directory (which, from a worktree or second checkout, is silently the wrong repository). Setfalsefor a server that only ever serves the repository it was started in. Explicit diffs,review_plan, and the CLI are unaffected.reasoning_effort— Codex only. Gemini's effort is baked into its model name (e.g."Gemini 3.8 Flash (High)"), so the field is ignored for Gemini.codex_path— absolute path to a codex binary for the Codex SDK to spawn (theCODEX_PATHenv var works too; the config field wins). Normally unnecessary: when unset, the SDK uses its own bundled binary, and if that binary can't run the bridge auto-discovers a working system codex from your PATH and the usual install locations (~/.local/bin,/opt/homebrew/bin,/usr/local/bin), retries, and logs the substitution on stderr. Set it explicitly to pin a specific binary — an explicit path disables auto-discovery entirely.
Where the config is discovered
When the MCP server or CLI starts, it looks for .reviewbridge.json in this order. The first match wins; nothing is merged.
RB_CONFIG_PATHenv var — if set, load exactly that file. Useful when the bridge is launched from a directory that isn't your project (e.g. an MCP host launches it from your home dir). Missing or unreadable file is a hard startup error so typos are surfaced immediately, not silently ignored.Walk-up from the working directory — looks for
.reviewbridge.jsonin the current directory, then each parent. The walk stops at the first.gitboundary so a project nested inside an unrelated git repo doesn't accidentally inherit a parent project's config.$HOME/.reviewbridge.json— a per-machine default. Drop one here to pin a model (e.g.{"model": "gpt-5.6-sol"}) for every project on the box without having to touch each one.Built-in defaults — what you get if nothing is found anywhere.
A startup log line on stderr names the source ([codex-bridge] config source: project (/repo/.reviewbridge.json)) so you can confirm which file is in effect.
The CLI's --config <dir> flag is an explicit override: it looks only at <dir>/.reviewbridge.json and skips the cascade entirely (env vars and $HOME are not consulted in that mode).
Selected files must parse cleanly. Once a
.reviewbridge.jsonis found, malformed JSON or schema-invalid values abort startup. The walk-up does not silently skip past a broken file to the next candidate — that would hide your typo and leave you running on defaults.
Model selection
model takes a concrete id, "latest", or a tier; each provider resolves its own default when the field is unset.
Tiers let a caller pick by difficulty or urgency instead of tracking model ids. Each provider maps a tier to its own model, and the tier carries across provider failover:
Tier | Pick it for | Codex | Gemini |
| Hardest problems: architecture, concurrency, security, subtle bugs |
|
|
| Everyday code and plan review |
|
|
| Small diffs, precommit sanity checks, style passes, quick iteration loops |
|
|
Rule of thumb for an agent: fast for a precommit check or a diff under a few hundred lines with no cross-file logic, max when the plan or diff touches concurrency, auth, data integrity, or a design you are unsure about, balanced otherwise. The tier name is reported back as requested in models, with the concrete id in resolved.
Codex — default gpt-6-astra. If Astra has not reached your account yet, pin gpt-5.6-sol:
Model | Description |
| Latest flagship agentic coding model (default) |
| Previous flagship. Use while Astra is still rolling out to your account. |
| Cheap and fast line (the |
Gemini — default resolves to the latest Flash via agy models. Effort is part of the model name:
Model | Description |
| Default — fast review line |
| Higher effort |
| Heavier reasoning line |
"latest" resolves to the newest Flash for Gemini, or the SDK-pinned flagship for Codex. These are the models we document and recommend; the model field, the model tool parameter, and the --model CLI flag accept any trimmed, control-free selector up to 200 characters, so you can run others. For Gemini, an unrecognized model triggers a non-blocking stderr warning (agy may silently run a different one) — run agy models to see the live list.
Provider failover
When fallback is on (the default) and both providers are set up, a review that fails because the configured provider is out of usage or unavailable (rate-limited / usage cap, model not available on your tier, or not signed in) is automatically retried on the other provider. You'll see a one-line note on stderr:
[codex-bridge] codex unavailable (RATE_LIMITED); falling back to geminiThe result is tagged with the provider that actually served it ("provider": "gemini") and carries a failover block saying what happened, so a Gemini answer to a Codex request is never mistaken for the primary having served:
"failover": {
"from": "codex",
"error": "MODEL_ERROR: Model \"gpt-5.3-codex-spark\" was rejected, ...",
"requested_model": "gpt-6-astra",
"carried_model": "max"
}requested_model is what the call asked for; carried_model is what the other provider was handed. A tier (max / balanced / fast) carries as-is, and a provider-specific id that is one of that provider's tier models is carried as its tier (gpt-6-astra → max, so Gemini answers with its Pro model rather than its Flash default). Any other id cannot be mapped: carried_model is null and the secondary resolves its own default. The models[] entry keeps the original requested selector either way. review_mode says which composition is configured; the presence of failover says one actually happened. Notes:
Fresh reviews only. A resumed session lives in one provider's conversation store, so a
session_idreview is not failed over — start a fresh review on the other provider to continue.Data egress. Failover can send your diff to the other vendor (e.g. OpenAI → Google) when the primary is down. Set
"fallback": falseto disable this (also good for CI determinism).Failover never triggers on a bad diff or a malformed model response — only on genuine provider-unavailability.
Deliberation
"mode": "deliberate" sends review_plan and review_code to both providers independently, then returns where they agree vs diverge so the caller (Claude Code) can synthesize. Findings both providers flag are high-confidence; findings only one flags need a judgment call.
{ "provider": "codex", "mode": "deliberate" }The result keeps the usual shape (a merged verdict/findings, worst-verdict wins) plus an additive deliberation block:
{
"verdict": "reject",
"findings": [
/* deduped union of both providers */
],
"deliberation": {
"providers": ["codex", "gemini"],
"verdicts": [
{ "provider": "codex", "verdict": "request_changes" },
{ "provider": "gemini", "verdict": "reject" }
],
"agreement": "conflict", // agree | mixed | conflict
"agreed": [
/* findings BOTH flagged — high confidence */
],
"divergent": [
{
"provider": "gemini",
"finding": {
/* only one flagged */
}
}
]
}
}Notes:
Cost/egress: deliberation always runs both providers and sends the diff to both vendors — best for high-stakes reviews, not every precommit.
review_precommitstays failover under this mode.Degrades gracefully: if one provider is out of usage, you get the other's review with
deliberation.degradedset anddeliberation.agreement: "degraded"(it subsumes failover).Resumed sessions deliberate too: passing a
session_idresumes the review on the provider that owns that session while the other provider reviews fresh, then the two are combined — so plan→code lifecycles keep deliberating instead of silently dropping to one provider. The combined result keeps the resumed session's id.Per-call toggle:
review_plan/review_codeaccept adeliberateboolean (CLI:--deliberate/--no-deliberate) that overrides the configured mode for a single call —trueforces deliberation,falseforces single-provider failover. Requestingdeliberate: trueunder"mode": "single"returns an error (no second provider).review_modeon every result: every review result carries areview_modefield (single/failover/deliberate/deliberate-deep) naming the composition that actually ran, so the absence of adeliberationblock is never ambiguous.
Deliberate-deep (cross-review round)
"mode": "deliberate-deep" is deliberation plus one more step: after both providers review, each divergent finding (one only one provider flagged) is handed to the other provider to adjudicate — confirm it's a real issue, dispute it as a false positive, or mark it unsure. Because providers word findings differently and cite different line numbers, semantically-identical issues often land in divergent rather than agreed; the cross-review round tells you which of those one-sided findings the other provider actually stands behind.
{ "provider": "codex", "mode": "deliberate-deep" }Each divergent item gains an optional adjudication (the agreed findings and top-level shape are unchanged):
"divergent": [
{
"provider": "codex",
"finding": { "severity": "major", "category": "Null safety", "file": "src/auth.ts", "line": 5, "description": "…" },
"adjudication": { "by": "gemini", "verdict": "confirmed", "reason": "returns undefined for a header with no space" }
}
]Notes:
verdictisconfirmed(a real issue),disputed(a false positive here), orunsure(can't tell from the change).byis the provider that adjudicated — always the one that did not raise the finding.Top-level
verdictis not folded back: under deliberate-deep the result'sverdictstill reflects both providers' independent reviews (worst-of-both). The per-findingadjudications are advisory input for your synthesis — the bridge does not recompute the verdict from them (ISS-015). Arejectresting on findings the other providerdisputedstill reportsreject; it's up to you to weigh the adjudications.Cost: adds up to two more provider calls per review (one per side that has divergent findings). Skipped entirely when there's nothing divergent. The cross-review subject is sliced to just the files the divergent findings touch, so it stays small even on large diffs.
Best-effort: if a provider is out of usage or errors during the cross-review round, its side is simply left un-adjudicated and reported in
deliberation.cross_review_failures— the deliberation result still returns.
Storage
Set REVIEW_BRIDGE_DB to persist review history and session state:
export REVIEW_BRIDGE_DB=~/.review-bridge.dbDefaults to reviews.db in the current directory. Set to :memory: for ephemeral storage.
Review execution is admitted before large inputs enter a provider: at most four logical reviews may
run globally and only one may run for a given session_id. Excess work returns REVIEW_BUSY
immediately. If durable outcome recording fails after a provider succeeds, the successful review is
still returned with provenance.persistence: "memory_only" and a sanitized warning. Synthetic
no-change/no-staged results use not_recorded and do not create or mutate sessions.
Troubleshooting
Error codes are provider-neutral. With fallback on (default), many of these auto-recover by retrying on the other provider — the messages below apply when there's no second provider set up or fallback is off.
Error | Fix |
| Run |
| Run |
| Install the Antigravity |
| Try a different model, switch |
| On macOS, XProtect can false-positively quarantine the SDK's bundled codex binary. The bridge auto-discovers a working system codex (PATH, |
| Wait and retry, or rely on failover to the other provider. |
| Check your internet connection. |
| The |
| Four reviews are already active, or this session already has a review in progress. Retry after the active call finishes. |
| Resume ownership could not be read safely. Restore durable storage or start a fresh review without |
| Increase |
| Review storage never opened, usually because the SQLite native addon could not load. Reviews still run; history is not kept. See SQLite native addon cannot load. |
SQLite native addon cannot load
Both disk-backed and in-memory review storage require better-sqlite3's native addon. If it is missing or incompatible with the MCP host's Node.js version or architecture, the server still starts and keeps serving reviews, but without any review storage: the startup diagnosis is logged once on stderr, review_history and review_status (for sessions this process is not running) answer STORAGE_UNAVAILABLE with that diagnosis, and every review result carries provenance.persistence: "not_recorded" with the diagnosis as its warning. Session resume works only within the running process. Switching REVIEW_BRIDGE_DB to :memory: cannot fix this. Ordinary database-file failures still fall back to memory after it successfully initializes.
After a Node.js upgrade or switch (nvm, Volta, Homebrew), the previously built addon no longer matches the host's ABI and fails with a NODE_MODULE_VERSION mismatch. Run npm rebuild better-sqlite3 in the affected installation with the new Node.js active, then reconnect.
A missing addon can follow an incomplete installation or disabled install scripts; the error alone does not identify the cause. ABI errors can also occur after changing Node.js versions.
Stop the bridge and use a terminal with the same Node.js version and architecture as the MCP host.
For an npx installation, locate the affected install root from the binding paths in the error: the directory immediately above
node_modules(typically~/.npm/_npx/<id>). For a local installation, use the project containing thatnode_modulesdirectory.In that directory, run
npm rebuild better-sqlite3 --ignore-scripts=falseand let it finish outside the MCP startup timeout. If it fails, resolve the reported prebuilt-binary download or native build prerequisite error before retrying. A fresh installation must also complete with install scripts enabled.Restart the MCP connection after the rebuild succeeds.
The bridge does not rebuild dependencies or remove npm caches automatically. Reconnecting alone may reuse an incomplete npx installation.
Architecture
┌─ @openai/codex-sdk ──► OpenAI Codex
Claude Code ──MCP/CLI──► bridge ──┤
│ └─ agy subprocess ─────► Google Gemini
SQLite DB
(review history)Both providers sit behind one ReviewBackend seam. Codex uses @openai/codex-sdk (which spawns codex exec internally; ChatGPT and API-key auth share the same path); Gemini wraps the agy --print --sandbox subprocess. A failover decorator wraps the two so an out-of-usage primary retries on the other.
src/
index.ts → Entry point (routes to MCP or CLI)
mcp.ts → MCP server startup
server.ts → Server setup, tool registration
cli/ → Standalone CLI (Commander.js)
tools/ → MCP tool handlers (5 tools)
backends/ → Provider backends behind one seam: codex, gemini (agy),
a shared orchestrator, and the failover decorator
codex/ → Prompts, Zod response schemas, shared types
config/ → .reviewbridge.json loader
storage/ → SQLite persistence (reviews, sessions)
utils/ → Git diff, chunking, error typesDevelopment
git clone https://github.com/AmirShayegh/codex-claude-bridge.git
cd codex-claude-bridge
npm install
npm test
npm run buildCommand | Description |
| Run tests (Vitest) |
| Bundle with tsup |
| Type checking |
| ESLint |
| Prettier |
License
MIT
Available Tools
5 toolsreview_codeA
Get an independent code review of your changes before committing. Call this after writing or modifying code. Pass a git diff as input. The diff parameter MUST contain actual git diff output (from git diff, gh pr diff, etc.), NOT a summary or description of changes. To review a branch or landed commits, pass base (and optionally head) instead and the bridge runs git diff base head in cwd. If you reviewed a plan first, pass the same session_id so the reviewer checks the code against the plan. Returns a verdict, findings, responding models, and persistence provenance. An auto-captured review also returns captured_from: the absolute directory the bridge ran git in. If that is not the repository you are working in, pass the diff explicitly.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Absolute path to the directory this review runs in — the repository or git worktree whose code is being reviewed. Auto-capture, repository instruction files, and the reviewer subprocess all use it. Always pass it: an auto-capturing review without it is refused unless the server is configured with "require_cwd": false, in which case the server's launch directory is used. Must be absolute; "~" is not expanded. Applies to this call only — pass it again on resume. | |
| base | No | Review a committed range instead: the ref to diff FROM (e.g. "main", "origin/main", a commit, or "HEAD~1"). Runs git diff <base> <head> in cwd. Cannot be combined with diff. | |
| diff | No | Raw git diff output to review. Must be unified diff format (output of git diff, gh pr diff, etc.). Do NOT pass summaries or descriptions. If omitted, auto-captures changes via git diff HEAD. | |
| head | No | The ref to diff TO when base is given (default: "HEAD"). Requires base. | |
| model | No | Override the configured default model for this call (e.g., "gpt-5.6-sol"), or "latest". Or pick a tier instead of a model id: "max" (hardest problems — architecture, concurrency, security, subtle bugs), "balanced" (everyday review), or "fast" (small diffs, precommit sanity, quick iteration). Tiers map per provider (Codex: gpt-6-astra / gpt-5.6-sol / gpt-5.6-luna; Gemini: 3.1 Pro (High) / 3.8 Flash (High) / 3.8 Flash (Medium)) and survive failover. May be combined with session_id to change model mid-session; without it a resumed session keeps the model it was recorded with. Compare returned resolved and observed labels for runtime changes. | |
| context | No | Intent of the changes | |
| criteria | No | Review criteria to focus on | |
| auto_diff | No | Auto-capture working tree changes (staged + unstaged) via git diff HEAD | |
| deliberate | No | Per-call override of the configured review mode: true = both providers review (deliberation); false = single provider with failover. Omit to use the configured mode. Requires a two-provider setup; requesting deliberation under a single-provider config returns an error. Under deliberate-deep, the returned verdict reflects both providers' independent reviews and is NOT recomputed from cross-review adjudications — treat deliberation.divergent[].adjudication as advisory input for your own synthesis. | |
| session_id | No | Continue from previous review |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It adds meaningful context: what the tool returns ('verdict, findings, responding models, and persistence provenance'), what counts as valid diff input, the auto-capture behavior, and the captured_from field. It does not fully disclose side effects like provider calls or failure modes, but for a review tool the key behaviors are surfaced clearly.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is longer than average but each sentence earns its place: purpose, when to call, diff format requirements, branch mode, plan linkage, return values, and auto-capture caveat. It is front-loaded with the core purpose and then moves through key usage constraints. It could be tightened slightly, but it remains well-structured for a tool with 10 parameters.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex tool with 10 parameters, no output schema, and no annotations, the description covers the most important contextual information: call timing, input format requirements, alternative input modes, plan continuation, return values, and auto-capture edge case. It does not explain every parameter, but the input schema already covers those in detail. The description is complete enough for an agent to invoke the tool correctly in common scenarios.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description goes beyond the schema by adding critical usage semantics: the diff parameter MUST contain raw git diff output rather than a summary, base/head causes the bridge to run `git diff base head`, and session_id links the review to a previously reviewed plan. This is genuine added value on top of the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific action and resource: 'Get an independent code review of your changes before committing.' This clearly identifies the tool's purpose and scope. It does not explicitly name sibling tools to differentiate them, but the emphasis on reviewing code changes before committing is enough to distinguish it from review_plan, review_history, review_precommit, and review_status.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives explicit when-to-use guidance: 'Call this after writing or modifying code.' It also explains the two input modes (raw diff vs. base/head), when to pass session_id, and when to pass diff explicitly (if auto-captured cwd is not the repository). It stops short of explicitly naming alternatives or saying when not to use this tool in favor of a sibling, so it earns a 4 rather than a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
review_historyA
Look up past review results. Query by session_id to see all reviews in a session, or use last_n to get recent reviews. Results include immutable responding-model snapshots and a next_cursor for bounded pagination. A session_id query also returns the session's own state (in_progress / completed / failed with timestamps), so a review that failed or timed out is visible even though it produced no review row.
| Name | Required | Description | Default |
|---|---|---|---|
| cursor | No | Decimal review-row cursor returned as next_cursor by the preceding page | |
| last_n | No | Return 1–100 reviews | |
| session_id | No | Specific session to query |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations present, the description carries the full burden and does well: it discloses immutable snapshots, bounded pagination via next_cursor, and that failed/timed-out sessions still appear through the session's state. Some details like ordering or exact timestamp granularity are omitted, but the key behavioral traits are covered.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three dense sentences, with the core purpose front-loaded and every sentence earning its place. It packs query modes, result content, pagination, and failure visibility without repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Even without an output schema, the description gives the agent a good mental model of the return content: snapshots, cursor, and session state. It does not spell out the exact response shape or ordering, but it is sufficient for correct selection and invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3, but the description adds genuine meaning: session_id returns the session's own state, last_n means recent reviews, and cursor is tied to bounded pagination. That is more than a restatement of the parameter names.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with the specific, intelligible action 'Look up past review results' and immediately distinguishes history access from the plan/code/precommit/status siblings. The two query modes (session_id and last_n) specify exactly what resource is being accessed.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It clearly states when to use each parameter: session_id for all reviews in a session, last_n for recent reviews. It does not explicitly name sibling tools or say when not to use them, so it stops short of an exclusion-based routing guide.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
review_planA
Get an independent code review of your implementation plan before writing code. Call this after drafting a plan and before implementing it. Returns a verdict (approve/revise/reject), findings, session_id, responding models, and persistence provenance. Pass the returned session_id to review_code later so the reviewer has full context.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Absolute path to the directory this review runs in — the repository or git worktree whose code is being reviewed. Auto-capture, repository instruction files, and the reviewer subprocess all use it. Always pass it: an auto-capturing review without it is refused unless the server is configured with "require_cwd": false, in which case the server's launch directory is used. Must be absolute; "~" is not expanded. Applies to this call only — pass it again on resume. | |
| plan | Yes | The implementation plan to review | |
| depth | No | Review depth | |
| focus | No | Review focus areas | |
| model | No | Override the configured default model for this call (e.g., "gpt-5.6-sol"), or "latest". Or pick a tier instead of a model id: "max" (hardest problems — architecture, concurrency, security, subtle bugs), "balanced" (everyday review), or "fast" (small diffs, precommit sanity, quick iteration). Tiers map per provider (Codex: gpt-6-astra / gpt-5.6-sol / gpt-5.6-luna; Gemini: 3.1 Pro (High) / 3.8 Flash (High) / 3.8 Flash (Medium)) and survive failover. May be combined with session_id to change model mid-session; without it a resumed session keeps the model it was recorded with. Compare returned resolved and observed labels for runtime changes. | |
| context | No | Project context and constraints | |
| deliberate | No | Per-call override of the configured review mode: true = both providers review (deliberation); false = single provider with failover. Omit to use the configured mode. Requires a two-provider setup; requesting deliberation under a single-provider config returns an error. Under deliberate-deep, the returned verdict reflects both providers' independent reviews and is NOT recomputed from cross-review adjudications — treat deliberation.divergent[].adjudication as advisory input for your own synthesis. | |
| session_id | No | Continue from a previous review session |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral disclosure burden. It discloses the return payload (verdict with approve/revise/reject, findings, session_id, responding models, persistence provenance) and the session continuation contract. It does not enumerate failure modes or side effects, but for a read-only review tool this is reasonably complete.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences with zero filler: the first front-loads purpose and timing, the second states the return value and the session chaining behavior. Every clause carries new information, and the sibling reference is integrated without unnecessary detail.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Since there is no output schema, the description compensates by listing the return fields and the session flow. Eight parameters exist, but each is thoroughly documented in the schema, leaving the description to cover the when/why/what-returns glue. It could briefly mention depth/focus, but the schema already provides their semantics.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3 even though the main description says little about individual parameters. The description's reference to session_id adds cross-call context beyond the schema's per-field text, but it does not need to compensate for uncovered parameters. It neither improves nor harms the schema's already rich parameter semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: 'Get an independent code review of your implementation plan before writing code.' It also names the handoff to sibling review_code, making the distinction from the sibling code-review tools explicit. An agent can immediately tell this tool is for plans, not code.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says when to call it ('after drafting a plan and before implementing it') and how it sequence with an alternative sibling: 'Pass the returned session_id to review_code later so the reviewer has full context.' This gives the agent both timing and routing guidance with no inference required.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
review_precommitA
Final sanity check right before committing. Auto-captures staged git changes. Call this after git add and before git commit to catch last-minute issues. Returns ready_to_commit, blockers, warnings, responding models, and persistence provenance. An auto-captured check also returns captured_from: the absolute directory the bridge ran git in. If that is not the repository you are working in, pass the diff explicitly.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Absolute path to the directory this review runs in — the repository or git worktree whose code is being reviewed. Auto-capture, repository instruction files, and the reviewer subprocess all use it. Always pass it: an auto-capturing review without it is refused unless the server is configured with "require_cwd": false, in which case the server's launch directory is used. Must be absolute; "~" is not expanded. Applies to this call only — pass it again on resume. | |
| diff | No | Explicit diff to review instead of auto-capture | |
| model | No | Override the configured default model for this call (e.g., "gpt-5.6-sol"), or "latest". Or pick a tier instead of a model id: "max" (hardest problems — architecture, concurrency, security, subtle bugs), "balanced" (everyday review), or "fast" (small diffs, precommit sanity, quick iteration). Tiers map per provider (Codex: gpt-6-astra / gpt-5.6-sol / gpt-5.6-luna; Gemini: 3.1 Pro (High) / 3.8 Flash (High) / 3.8 Flash (Medium)) and survive failover. May be combined with session_id to change model mid-session; without it a resumed session keeps the model it was recorded with. Compare returned resolved and observed labels for runtime changes. | |
| auto_diff | No | Auto-capture staged git changes. Omit to use the project config default (review_standards.precommit.auto_diff). | |
| checklist | No | Custom pre-commit checks | |
| session_id | No | Continue from previous review |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden and does disclose key behavior: auto-capture, returned fields, captured_from behavior, and the diff fallback. It doesn't detail side effects or error conditions, but the main operational traits are visible.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The opening phrase is immediate, and every subsequent sentence adds either sequencing, return information, or a correction path. No filler or redundant restatement.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Since there is no output schema, listing the returned fields is valuable and mostly sufficient. A few terms (e.g., 'persistence provenance', 'responding models') are left unexplained, but the description covers how and when to call the tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so all parameters are documented. The description adds extra meaning by linking cwd and diff: when auto-capture uses the wrong directory, the caller must supply the diff explicitly.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description identifies a distinct operation: a final sanity check before commit that auto-captures staged git changes. This clearly separates it from the review_plan/review_code/review_history/review_status siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives explicit sequencing ('Call this after git add and before git commit') and a conditional rule (pass the diff explicitly if the auto-captured directory is not the working repo). It does not enumerate exclusions or alternatives, but the context is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
review_statusA
Check whether a review session is still running, completed, or failed. Use this if a review call timed out or you need to verify session state.
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID to check status of |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. It clearly describes a read-only status check and the possible states, but it does not disclose potential side effects (likely none), error behavior for unknown sessions, or response format. Adequate but not rich.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, zero wasted words. The purpose is front-loaded and the usage guidance follows immediately. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple single-parameter status tool, the description supplies the key usage trigger and the meaning of the state outcomes. It does not describe the return value, but the purpose is clear enough that an agent can call it correctly even without an output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema covers 100% of the single parameter with a clear description: 'Session ID to check status of.' The tool description adds no additional parameter-level meaning, so the baseline of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb ('Check') and resource ('review session') and enumerates the possible outcomes (running, completed, failed). This distinguishes it from sibling tools like review_plan and review_code which clearly perform different actions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly gives a concrete usage condition: 'if a review call timed out or you need to verify session state.' It does not mention when not to use it or name alternatives, so it falls just short of the highest bar.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v1.8.0- First observed
review_code - First observed
review_history - First observed
review_plan - First observed
review_precommit - First observed
review_status
TDQS
Scored across 5 tools
Most tools target distinct review stages (plan, code, precommit), but review_history and review_status both expose session state, and review_code/review_precommit both review code changes. Descriptions clarify the intended call context, but an agent could still select the wrong tool in some cases.
All tools follow a consistent review_<stage/object> snake_case pattern, making the set predictable. The names map clearly to their functions; review_precommit is the only slightly irregular suffix but still reads naturally.
Five tools is a well-scoped size for a review bridge: plan, code, precommit, history, and status. There is no bloat, and each tool addresses a distinct workflow need.
The surface covers the full review lifecycle: plan review before implementation, code review after edits, precommit sanity checks, historical lookup, and async status. There are no obvious dead ends or missing operations for the stated purpose.
Maintenance
Related MCP Connectors
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
A paid remote MCP for OpenAI Codex memory MCP, built to return verdicts, receipts, usage logs, and a
A paid remote MCP for OpenAI Codex harness MCP, built to return verdicts, receipts, usage logs, and
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server that lets Claude Code ask GPT Codex for adversarial planning, code review, debugging, research, and risk triage without leaving your project workflow.96 npm1MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server that provides agentic code review powered by OpenAI-compatible models, designed for use with Claude Code.1MIT
- AlicenseNot gradedqualityBmaintenanceMCP server enabling Claude to consult Codex (GPT-5.x) mid-task for second opinions, plan/diff review, brainstorming, and codebase exploration via structured debates and permission-controlled interactions.2MIT
- AlicenseNot gradedqualityCmaintenanceA MCP server that enables Claude Code to delegate coding tasks to Codex via the MCP protocol, with task management, security checks, and result verification.18 npmMIT