Skip to content

Codex Pair ​

In the portable /codex-pair skill, a positively identified Codex writer with a Codex reviewer ends before setup or consent in one message: the same family reviewing itself is not an independent review; use /grok-pair; completed (not applicable). It asks no question and makes no review call. This depends on the writer's model family, never the host name: Cursor and Pi can run other families. An unknown writer or a different provider keeps the existing adapter behavior. Pi's native /codex-pair command also supports explicit Claude review of Codex-family edits after reviewer consent.

Codex-pair supports each host with a different lifecycle adapter. The detailed detached-worker and Stop-gate material on this page describes Claude Code. On Cursor Agent there is no background reviewer: /codex-pair runs an on-demand, consent-gated persisted Codex session (through a user-installed ask-codex leaf when exposed, otherwise the fully pinned unified ask-llm) and the -ack/-pause/-resume toggles are not exposed; see Cursor Agent Host. On Pi, successful tool_result edit/write events feed an in-process debounce; findings are delivered with non-triggering steer; the marker, project trust and consent for the selected reviewer and canonical project are required; shutdown aborts active review work; blocking Stop-gate and one-shot print parity are unsupported. See Pi Host Support.

codex-pair is the plugin's flagship feature: continuous, opt-in code review where Codex reads every file Claude edits. It is the recall-first complement to the on-demand /codex-review skill. Setup never enables pairing. The hook is always loaded but self-gates on a project marker file and stays completely silent (zero cost, zero Codex calls) until a project opts in. Once enabled, a burst of edits to one file coalesces into a single debounced review of the settled file state, run by a detached worker; verdicts surface to Claude on both hook channels (transcript systemMessage plus model-visible additionalContext) and drain on the next edit, the next user prompt, or at turn end via the Stop hook.

Why this exists: in a four-task benchmark recorded in the project's decision log (four structurally different task types: CRUD endpoint, URL shortener, RFC-spec implementation, stateful business logic, chosen so the result would generalize across domains) Claude alone caught 2 of 10 probes; Claude + /codex-review caught 7 of 10; Claude + codex-pair caught 10 of 10. The three probes /codex-review missed exemplified the "looks fine, runs wrong" class: code that compiles, lints, and type-checks but produces wrong results because of an implicit invariant the model couldn't infer from a single file. codex-pair's recall-first HIGH/MED/LOW grading catches that class. The improvement is task-agnostic, reproduced across all four tasks, not just the headline one. The two surfaces are complementary, not competing. (A subsequent lived-experience audit confirms the benchmark holds in real flow on this very repo.)

Grok CLI ​

text
Grok file edit / shell call -> shared pair hook -> Codex Sol (default)
                                             └-> Claude Opus 5.5 (opt-in)
                                                      |
                                       additionalContext -> next Grok step

Grok CLI 1.0.70 supports the same marker, review prompt, findings format, cache, log and pause/resume/ack state. Reviews run synchronously so the note reaches the model before the hook exits; Grok ignores the guide's async field. Catch-up is unavailable on Grok: it has neither a Stop gate nor a prompt drain. Existing Claude Code behavior and defaults remain unchanged.

Create .codex-pair/context.md with project invariants and optional frontmatter:

markdown
---
reviewer: codex
---
Project invariants for the reviewer.

reviewer: codex is the default (gpt-6.2-sol, high effort, existing disclosed Terra quota fallback). reviewer: claude opts into pinned claude-opus-5-5, read tools only, no model/provider fallback. Marker reviewer is the sole reviewer setting. Invalid settings refuse; choosing a reviewer from the writer's own family also refuses (for example Claude reviewing Claude Code). The Claude timeout is marker timeoutMs, then ASK_CLAUDE_TIMEOUT_MS, then 600 seconds. Existing Codex settings still apply to Codex.

Register this yourself in ~/.grok/hooks/ask-llm-pair.json (or $GROK_HOME/hooks/ask-llm-pair.json), using the absolute installed @ask-llm/mcp directory as <package-root>. Keep a single pair hook registration and remove any duplicate imported Claude pair hook for Grok:

json
{
  "hooks": {
    "PostToolUse": [{
      "matcher": "search_replace|run_terminal_command",
      "hooks": [{
        "type": "command",
        "command": "node \"<package-root>/scripts/grok-pair-watch.mjs\"",
        "timeout": 1800
      }]
    }]
  }
}

Restart Grok and inspect /hooks. Global hooks run under headless grok -p; project .grok/hooks/ files need folder trust, which also trusts the folder's other integrations. ask-llm setup does not install this hook or change trust files. Tests use isolated HOME and GROK_HOME only.

File edits review the resulting file. Shell reviews cover the command text as given, with no diff or resulting file contents; all shell calls are eligible because commands cannot reliably be classified as writes. The prompt explains this coverage limit. Shell logs and include/ignore filters use a synthetic [shell command] path under the event cwd. Oversized commands receive a partial view. Findings are advisory after the edit has already happened.

Use the portable pause, resume and ack skills against the same .codex-pair/ state. Grok honors the existing file-scoped acknowledgement hash in advisory output; original findings remain in the log. See the Grok skill adapter for setup, acknowledgement hashes and status reporting. Pairing sends file/command context through the selected authenticated reviewer CLI and consumes that account's quota; this adapter never calls the metered xAI API. Cursor Agent per-edit integration and Codex CLI per-edit hooks remain outside this adapter.

The remaining sections describe the Claude Code lifecycle unless another host is named.

Setup ​

Run the /codex-pair slash command in the project where you want continuous review. On first run (no marker present) on Claude Code it copies a committed .codex-pair.example/context.md from the repository root to .codex-pair/context.md at that root without asking; it never overwrites an existing marker. Without a template it offers interactive setup with auto-detected project context and writes .codex-pair/context.md in the current directory after confirmation. Setup finds existing markers by walking up from the current directory through the repository root. Either way it keeps .codex-pair/ out of git through the local exclude file described below. You can also create the marker by hand:

bash
mkdir -p .codex-pair
cat > .codex-pair/context.md <<'EOF'
---
blockOn: false
---
# .codex-pair/context.md

This is a payment-processing service. All currency calculations must
use integer cents internally (floating-point loses precision on every
charge). Concurrent requests are real. URL inputs are untrusted.

[Add domain invariants Codex can't infer from one file. Examples:
 Security: "all routes check user.role".
 Specs: "protocol XYZ must be followed".
 State: "cart syncs to localStorage on every mutation".
 Concurrency: "this handler must be idempotent under retry".]
EOF

On Claude Code, the marker file opts the project into review; CODEX_PAIR_DISABLED=1 or a pause sentinel still prevents reviews. Its content is review context. Interactively drafted markers explicitly set blockOn: false for advisory review; template copies preserve their settings, including blockOn. An existing marker without blockOn remains advisory. On Pi, marker presence is only the repository-side gate: it never authorizes provider transfer/cost without Pi project trust and separate interactive /codex-pair consent stored outside the repository.

Do NOT commit the .codex-pair/ directory: keep it ignored. Each contributor's review context is their own; one developer iterating on prompt wording shouldn't dirty the shared history. The hook itself is project-policy (it's in the plugin); the marker is per-developer opt-in. Every state artifact (marker, log, cache, ignore globs, pause sentinel, inflight locks) nests under the single directory; one ignore line covers everything:

gitignore
.codex-pair/

/codex-pair setup on Claude Code appends that line to git's local exclude file, the path git rev-parse --git-path info/exclude prints. A linked worktree has a .git file rather than a folder, so the path comes from git; all worktrees of a repository share that file. Setup never edits .gitignore and skips the exclude entry when git already ignores the entire .codex-pair/ directory. It verifies directory-wide exclusion after appending and exits non-zero if higher-priority rules still prevent it. Add the line to .gitignore or your global ignore file yourself if you prefer.

For a new contributor or a fresh worktree, commit a template at .codex-pair.example/context.md in the repository root: /codex-pair copies it with no questions, and each developer can then edit their own copy. You can run the same step directly from the project with node packages/llm-mcp/scripts/codex-pair-log.mjs setup. Its first word reports the outcome: created, exists, no-template, not-git, invalid-template, invalid-marker or ignore-failed. Templates and markers must be regular files inside the repository with no symlinked path components; invalid paths are refused before copying or changing ignore rules. Setup verifies directory-wide exclusion before copying a template; exclusion failure leaves no new marker. Status warns when an existing marker's directory is unignored and names the setup command to fix it without overwriting the marker.

Once present, every Edit / Write / MultiEdit triggers a Codex review of the changed file. HIGH and MED concerns appear to Claude as a system reminder on the next turn, prefixed with [codex-pair] and the file path:

[codex-pair] src/billing/charge.ts

[HIGH] Monetary values are modeled as floating-point numbers
src/billing/charge.ts:12: `price` accepts arbitrary JS numbers for
money, which violates the stated requirement that currency uses
integer cents. Use integer minor units such as
`priceCents: z.number().int().nonnegative()`.

When to enable it ​

Decide BEFORE you opt in; the hook consumes provider quota or incurs account charges per edit, and the value is highest on code where missed concerns have outsized blast radius. The decision is about code characteristics, not project domain: any project has both kinds of code, and codex-pair earns its keep wherever there's a category of "looks fine, runs wrong" failure mode.

Use the hook (recall-first)Stick with /codex-review only (precision-first)
Code with hidden invariants the model can't infer from one fileRoutine PR review
Code where latent bugs justify per-edit quota useGlue code, simple CRUD, refactors
Code evolving fast under written constraints (spec, protocol, ADR)Cost-sensitive sessions
State coordination, concurrency, anything order-sensitiveOne comprehensive report is enough
The "looks fine, runs wrong" failure mode would be expensive to catch later

Slash commands ​

The /codex-pair suite is the human-facing dashboard and controls for the hook. The hook itself runs automatically once the marker exists; these commands are for setup, inspection, and toggling.

CommandWhat it does
/codex-pairRuns setup when needed, starts a catch-up pass for an active marker and shows status
/codex-pair-pausePause the hook for this project without removing the marker. Writes a .codex-pair/state/paused sentinel the hook checks on every edit and records the pause. Use to temporarily silence reviews (noisy refactor, docs-only work) and resume later
/codex-pair-resumeRemove the pause sentinel, clear the failure counter and record the resume. Starts a catch-up pass and re-enables per-edit review. No-op if no pause sentinel exists
/codex-pair-ack <hash> "<reason>"Acknowledge a HIGH finding without fixing it (known trade-off or tracked in a ticket). The <hash> is the content hash shown alongside the finding when the Stop gate blocks. The reason is recorded as a concurrency-safe shard under .codex-pair/state/acks/ with a timestamp; acknowledged findings are skipped by the gate until the file changes

The hook pipeline ​

codex-pair is implemented as five hooks working together, all dependency-free with zero workspace imports so they run from marketplace git-subdir installs that don't run npm install. The watch hook sends reviews through the broker when available and uses codex exec --json for direct reviews. Catch-up uses the same watch hook through the detached worker; the prompt drain delivers persisted verdicts.

HookTriggerAction
codex-pair-watch (PostToolUse)After every Edit / Write / MultiEditIf a .codex-pair/context.md marker exists from the edited file's directory up to the project root, the edit is queued for review with the marker's content as context. Edits are debounced: a burst within the 15s settle window coalesces into one review of the settled state, run by a detached worker. No marker means the hook exits silently after one fs.access() call: zero Codex calls, zero cost
codex-pair-prompt-drain (UserPromptSubmit)On every user promptDrains queued codex-pair verdicts that finished mid-turn so they reach Claude without waiting for the next edit
codex-pair-stop-gate (Stop)At turn endStarts a catch-up pass in the background and drains queued verdicts. With blockOn: HIGH in the marker frontmatter (opt-in, default OFF), blocks turn-end while unaddressed HIGH findings or in-flight reviews remain. See Stop gate below
codex-pair-session (SessionStart)At Claude session startAnnounces or clears a pause, starts the broker when enabled and catches up after automatic resume
codex-pair-session (SessionEnd)At Claude session endClears debounce state and tears down this session's broker

By default HIGH and MED concerns are surfaced; LOW concerns and all timing/skip telemetry are logged to .codex-pair/log.jsonl alongside the marker file. Set debounceMs: 0 in the marker frontmatter for synchronous per-edit review.

In the shared review hook scripts (Claude Code and Grok CLI), a reviewer reply that matches neither the JSON verdict contract nor the legacy NONE / [HIGH]/[MED]/[LOW] format is never recorded as "no concerns": it is logged with verdict unparsed (with a short excerpt of the reply), surfaced once as codex-pair UNPARSED, left out of the review cache, and counted towards the consecutive-failure auto-pause. Pi also requires a recognized review and records unrecognized responses as failed attempts.

Catch-up review ​

On Claude Code, catch-up runs when /codex-pair finds or creates an active marker, on manual or automatic resume, and at turn end. Each pass reviews up to 10 files in sequence within one two-minute budget, using the same worker, cache, and file rules as per-edit review. Quota auto-pause ends the pass. The Stop hook starts the pass without waiting for a review. Set catchUpOnStop: false in .codex-pair/context.md frontmatter to skip the turn-end pass for that project.

A pass considers eligible dirty or untracked files in the marker's Git repository and any sibling repositories already registered in the session. It can pick up edits made through the shell, before activation, or during a pause. Shell writes committed before the pass, sibling repositories touched only through the shell, and deletions are outside its coverage. Catch-up also skips symlinks, symlinked path components beneath the marker directory, and files under another marker. No Bash hook is registered on Claude Code.

A retained successful review (none, concerns, or cached) counts when its content hash matches the current file and its review context is current, even after the cache expires. Failed attempts and debounce generations do not count. Losing the successful record to log rotation or changing the marker or resolved reviewer/model settings makes the file eligible again; a compatible cache hit can satisfy the new pass.

Configuration knobs ​

Env varDefaultEffect
CODEX_PAIR_DISABLEDunsetSet to 1 to bypass the hook entirely; beats marker file
CODEX_PAIR_MAX_FILE_BYTES20000Files larger than this many UTF-8 bytes get an adaptive partial-view review (header + git diff, or head+tail), not a full-content one. Still a Codex call; use .codex-pair/ignore to skip calls for excluded files
ASK_CODEX_TIMEOUT_MS800000Fallback review timeout in milliseconds; empty, non-numeric, non-positive, or infinite values use the default. Set timeoutMs in .codex-pair/context.md frontmatter to override it for this project. A debounced review retains the timeout resolved when its worker was scheduled, even if frontmatter changes during the settle window; the worker uses that timeout for its review process and in-flight lock. An enabled broker gets half the review budget, leaving the remainder for direct fallback
ASK_CODEX_REASONING_EFFORThighCodex pair reasoning effort; marker reasoningEffort takes precedence
ASK_CODEX_BROKERdisabledSet to 1 to opt in to the broker unless the project sets broker: false; otherwise use per-edit codex exec
ASK_CODEX_DEBOUNCE_MS15000Settle window: an edit burst to one file coalesces into a single review of the settled state. 0 = synchronous per-edit review. Also settable per-marker via debounceMs frontmatter
ASK_CODEX_DEBOUNCE_MAX_MS60000Hard cap from a burst's first edit; forces a review even under a continuous edit stream. Frontmatter: debounceMaxMs
CODEX_PAIR_QUOTA_PAUSE_TTL_MS21600000 (6h)Quota auto-pauses self-heal after this long; the next edit (or session start) retries a live review
CODEX_PAIR_FAILURES_PAUSE_TTL_MS86400000 (24h)Failure auto-pauses self-heal after this long, or immediately when the plugin version changed since the pause

For Codex reviews through the shared Claude Code/Grok hook, marker frontmatter model and fallbackModel override ASK_CODEX_MODEL and ASK_CODEX_FALLBACK_MODEL, then codex-pair-defaults.json. reasoningEffort follows the same precedence: marker, ASK_CODEX_REASONING_EFFORT, defaults file, then high. Supported effort values are low, medium, high, xhigh, max and ultra; invalid values fall through. The resolved effort applies to direct and broker calls, including retries and quota fallback, and changing it invalidates the review cache. For the pinned Claude reviewer and its timeout, see Grok CLI. Pi's separate implementation is unchanged.

yaml
---
model: gpt-6.2-sol
reasoningEffort: xhigh
blockOn: false
---

The broker is opt-in because it links your auth.json; a token refresh can rewrite that shared file, and a safer credential strategy has not been established. Set ASK_CODEX_BROKER=1 to enable it. It runs codex app-server in a private temporary Codex home without user hooks, rules, or MCP configuration and with the built-in apps connector disabled. Without an auth.json (keyring or environment-key setups) the broker does not start. To disable it for one project, put broker: false in .codex-pair/context.md frontmatter. ASK_CODEX_BROKER=0 also disables it.

Startup, transport, health, and protocol failures use the per-edit codex exec path. A quota error from the broker goes straight to the fallback model, and a transient provider error (502/503/504, connection resets) gets one direct retry. A broker turn gets half the review timeout, leaving the remaining time for its first direct fallback attempt; each later transient retry or fallback-model attempt gets only the time left after the broker turn. The broker's socket path is inside its private home, so deep project paths do not matter; Codex 0.156.1 makes that path a symlink to a socket in its shared per-user daemon directory, and teardown removes only the symlink; a broker recovered from an interrupted start is SIGKILLed, so its socket file stays in that daemon directory. A recorded broker is only signaled or reused while its process is still codex app-server on the recorded socket; a dead process, an expired 24-hour owner lease, or a broker bound to a different credential home is replaced on the next opted-in SessionStart. If ps cannot verify a recorded broker, SessionStart leaves its descriptor and private home intact and starts no replacement; the next SessionStart or SessionEnd can check again. An opted-in session without its own auth.json never stops another session's healthy broker. A SessionStart killed mid-start is recovered by the next one when ps can check for its orphan. An opted-out SessionStart leaves another session's healthy broker running and retires it only if the broker's own credential source is absent. A broker left running after a missed SessionEnd can therefore remain until an opted-in SessionStart recovers it, its owner ends, or its credential source disappears; there is no global orphan reaper. Overlapping Claude sessions in one project share one broker: when the session that started it ends, the others review through codex exec until a new session starts one.

Cold start measured under one second and warm reviews were no faster. The hooks, the broker, and every helper script are written in TypeScript and ship as generated JavaScript, so they run from a marketplace checkout or an npm install without a build step; they support Node 24 (the current LTS) or newer.

Auto-pause is self-healing ​

When the hook pauses itself (provider quota exhausted, or 3 consecutive review failures), the pause no longer requires a manual /codex-pair-resume to ever end:

  • At session start a paused project announces itself: a reminder if the pause is still fresh, or an automatic resume if it has expired. No more silently-dead pairing.
  • On any edit an expired auto-pause resumes in place and that edit gets reviewed; if the provider is still broken, the review fails and the hook re-pauses cleanly.
  • Plugin updates heal failure-pauses immediately: the pause sentinel records the plugin version that wrote it, and a version change is treated as "the cause was plausibly fixed".
  • Manual pauses are untouched: /codex-pair-pause still only ever resumes via /codex-pair-resume.

Cost characteristics ​

  • Usage varies by the selected model, reasoning effort, and workload; see Account costs.
  • Files over the size cap fall back to an adaptive partial-view review (header + git diff against HEAD, OR head + tail)
  • node_modules/, dist/, lockfiles, fonts, archives, sourcemaps, snapshots, minified assets skipped automatically
  • The content-hash cache skips unchanged review inputs; changing reasoning effort causes a cache miss.

For typical opted-in projects (small surface where review depth matters), the cost is acceptable. For routine refactor work across a whole repo, leave the marker file out and use /codex-review on demand instead.

Disable it ​

GoalHow
Temporarily for this project/codex-pair-pause (resume with /codex-pair-resume)
Permanently for this projectrm -rf .codex-pair/
Just this Claude Code session/plugin disable ask-llm
Just this commandCODEX_PAIR_DISABLED=1 <command>

Stop gate (opt-in) ​

Default: OFF. You must explicitly opt in.

Trigger: At the end of every Claude turn (Stop event).

Action: If unaddressed HIGH codex-pair findings remain in .codex-pair/log.jsonl, the hook blocks turn-end and surfaces those findings, forcing them to be addressed before the session continues.

Why opt-in? Blocking turn-end is disruptive for some workflows, so blocking defaults OFF. The gate decides from persisted findings and in-flight state. Catch-up review runs independently of blockOn; disable its turn-end pass separately with catchUpOnStop.

Enable it ​

Add a blockOn key to your .codex-pair/context.md YAML frontmatter:

markdown
---
blockOn: HIGH
---

# .codex-pair/context.md

This is a payment-processing service. All currency calculations must
use integer cents internally (floating-point loses precision on every
charge).

[Your domain context here...]

Once enabled, the hook checks at turn-end whether any HIGH findings in log.jsonl are unacknowledged and unresolved. It reconciles against present reality before blocking:

  • File deleted or renamed → finding skipped (no longer relevant)
  • File clean vs HEAD (git status --porcelain=v1 -z --untracked-files=all) → finding skipped (reverted or branch-switched away); new files inside untracked directories remain eligible to block, including files in nested git repositories reported as ?? dir/, except files ignored by the outer repository's .gitignore
  • Latest review of the content on disk is indeterminate (error/retried/broker_fallback) → fail-open, finding skipped (don't block on a stale HIGH from before a transient error). Skip entries have no content hash and do not displace the last review.
  • No review matches the content on disk → finding skipped. A queued settled edit gets its own review; edits outside Claude can be picked up by catch-up. The gate uses the latest matching review even if a review of older content finished afterward, including when that review was logged under another path to the same file (such as /var and /private/var on macOS).

In-flight reviews block too ​

With the default 15s debounce plus model review latency, a review is often still running when the turn ends; the log alone can't see it. When blockOn: HIGH is set, the gate also blocks (once per turn) while any review for a recent edit is still in flight (a settling debounce window, including a worker waiting for an earlier review of the same file, or a running Codex call), telling Claude to wait for the verdict before finishing. The stop_hook_active loop guard means a turn is never blocked twice for the same reason.

Queued verdicts drain at turn-end ​

Debounced verdicts that finished mid-turn used to wait for the next edit or user prompt to surface. The Stop hook drains them at turn-end, no blockOn opt-in required: as additional context when nothing blocks, or folded into the block message when it does. A queued verdict surfaces only while the file still holds the content it reviewed; a verdict for content that has since changed is dropped. The Stop and user-prompt hooks drain both the working directory's marker and sibling repositories registered by this session's edit hooks. Cross-repository verdicts (cwd in repo A, edit in repo B) can therefore surface at turn-end or on the next user prompt without switching cwd. Each marker's blockOn setting controls blocking for that repository. Without a session ID, only the working directory's marker is available.

Fail-open behavior ​

Any error in the stop-gate hook (missing log, parse error, git unavailable) warns to stderr and exits 0; the turn is never blocked due to a hook bug. This is intentional: a gate that blocks turns on its own fault is worse than no gate.

Troubleshooting and verification ​

Inspecting log activity: the codex-pair-log CLI ​

Shipped alongside the hook at packages/llm-mcp/scripts/codex-pair-log.mjs. Log and status commands walk up from cwd to find the marker (same gate as the hook), then read the sibling .codex-pair/log.jsonl. Useful for "is the hook actually running" diagnostics and for forensic analysis of what's been reviewed. The setup subcommand can run before a marker exists; see Setup.

bash
# Read-only status: resolved configuration, disable/pause state, last five reviews
node packages/llm-mcp/scripts/codex-pair-log.mjs --status

# Default: last 10 entries
node packages/llm-mcp/scripts/codex-pair-log.mjs

# Aggregate stats: verdict breakdown, top 5 files, cache hit rate, fallback frequency
node packages/llm-mcp/scripts/codex-pair-log.mjs --summary

# Filter to one file's history (including reviews logged through another path to the same file)
node packages/llm-mcp/scripts/codex-pair-log.mjs --file src/billing/charge.ts

# Only the last 24 hours
node packages/llm-mcp/scripts/codex-pair-log.mjs --since 24h --latest 50

# Pairing evidence for the last 24 hours
node packages/llm-mcp/scripts/codex-pair-log.mjs --report --since 24h
node packages/llm-mcp/scripts/codex-pair-log.mjs --report --since 24h --json

--report uses the repository marker found from the current directory. By default it covers all retained log entries, including Pi reviews. With --since, review counts, findings and attributions use the selected window, and the report includes pause windows that overlap it. HIGH blocking now uses the full retained log and the current Stop gate's rules, including marker opt-in, the file's dirty state and current content, and acknowledgements. Other unacknowledged HIGHs are listed separately.

The report counts actual successful reviews and cache hits separately. A finding hash counts once at its highest observed severity, and later appearances, including cache hits, count as repeats. The report includes acknowledgement reasons and findings no longer reported on the latest review of their file. Missing historical attribution is shown as unknown. When retained reviews lack finding identities, finding counts and lists describe only known evidence: the human output labels them known (partial), and JSON sets findingsComplete: false. This qualification covers unique findings by severity, repeats, acknowledgements, other unacknowledged HIGHs, and findings no longer reported on the latest review of their file; current gate blockers remain a separate exact result. Claude's effort also appears as unknown because pairing does not set or observe it. New Pi reviews report their reviewer, model and effort; historical Pi reviews may show unknown. Pi's pause/resume handlers do not yet record structured events. Copy the first line into a pull request description or closing status. The remaining lines contain details, which are also available as JSON.

The current coverage section lists eligible dirty files as pending, failed, or not started. Files beyond a pass's time or file limit appear by name. In JSON, the unreviewedFiles array identifies each file by its marker directory and relative path. This section uses the full retained log and can include registered sibling repositories when the session ID is available. --since only limits the historical metrics.

If coverage cannot be determined because Git scanning, marker reading, or reviewer configuration fails in the project or a registered sibling, --report exits with an error instead of returning empty coverage. A disappeared sibling marker is skipped. In a non-Git project, historical metrics remain available, with no files in Git coverage.

From the project directory, the same CLI accepts pause and resume to change the sentinel and record transitions. Use ack <hash> with a non-empty reason on stdin to acknowledge a finding. For example, pipe printf '%s\n' 'Accepted pending follow-up' to node packages/llm-mcp/scripts/codex-pair-log.mjs ack fc69d46835dfd2ab.

--status reads the same resolver as the hook and works before any review is logged; a missing marker produces an error. It reports disabled (CODEX_PAIR_DISABLED=1), paused (manual|quota|failures) or active. An invalid or same-family reviewer also reports disabled with the refusal reason, unless the disable switch or a pause takes precedence. For valid configuration it shows the reviewer, model, fallback, effort, threshold, timeout, file-size limit, debounce settings and Guards turn end on: HIGH or nothing. Claude review labels fallback and effort as unused.

It observes pause state without clearing expired auto-pauses or starting a reviewer. These are the current process's resolved settings; run it with the hook's environment. For Grok CLI, prefix the command with CODEX_PAIR_HOST=grok so reviewer selection uses the Grok writer family. Active means the marker is enabled and unpaused, not proof that a host registered or ran its hook; recent log entries provide that evidence. The Claude Code skill uses the start subcommand to schedule catch-up before showing the same status.

Output shape (one line per log entry):

2026-05-18T15:11:02.341Z  none          /project/src/billing/charge.ts        0H/0M/0L    6.2s
2026-05-18T15:11:14.892Z  concerns      /project/src/billing/charge.ts        1H/0M/0L    8.7s
2026-05-18T15:11:18.001Z  cached        /project/src/billing/charge.ts        1H/0M/0L    3ms

Zero workspace imports; runs on a marketplace install with no node_modules.

If the hook isn't firing automatically: the project-settings workaround (issue #74) ​

Some Claude Code installations don't auto-invoke plugin-declared PostToolUse hooks even though the plugin is correctly installed and /reload-plugins reports the hook count. This appears to be a Claude Code platform issue with the plugin-hook dispatch path; see issue #74 for the full diagnostic chain. The hook script itself works perfectly when invoked manually or when registered via a ~/.claude/settings.json / .claude/settings.local.json hooks block.

Quick diagnostic: edit any file under your marker-anchored project. If .codex-pair/log.jsonl mtime doesn't advance within ~60s, you're hitting the dispatch bug.

Workaround: add a hooks.PostToolUse block to your project-local .claude/settings.local.json (per-developer; gitignored by convention) that invokes the hook script directly, bypassing the plugin-dispatch path. Pick the command form that matches your use case:

Form A: Plugin maintainer (you're working on the ask-llm repo itself) ​

Point at the local repo source via $PWD so the path resolves to whatever directory Claude Code was launched in (the workspace root). Always reflects your current branch's working tree: no manual update on version bumps, no hardcoded absolute paths to maintain, and the same config works for every contributor regardless of where they cloned the repo:

json
{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Edit|Write|MultiEdit",
        "hooks": [
          {
            "type": "command",
            "command": "sh -c 'node \"$PWD/packages/llm-mcp/scripts/codex-pair-watch.mjs\"'"
          }
        ]
      }
    ]
  }
}

Caveats:

  • Requires launching Claude Code from the repo root (so $PWD resolves there). If you launch from a parent directory the hook silently fails; easy to spot via node packages/llm-mcp/scripts/codex-pair-log.mjs --latest.
  • Requires a POSIX shell (sh) in PATH, which macOS and Linux have natively.

Form B: Plugin user (you installed via marketplace) ​

Resolve the highest semver-sorted version from the cache at invocation time with Node's cross-platform numeric sort, so the workaround keeps working across plugin updates without relying on GNU-only sort -V:

json
{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Edit|Write|MultiEdit",
        "hooks": [
          {
            "type": "command",
            "command": "node -e \"try { const fs=require('fs'),cp=require('child_process'),p=process.env.HOME+'/.claude/plugins/cache/ask-llm-plugins/ask-llm'; const v=fs.readdirSync(p).sort((a,b)=>a.localeCompare(b,undefined,{numeric:true})).at(-1); if(v) process.exitCode=cp.spawnSync(process.execPath,[p+'/'+v+'/scripts/codex-pair-watch.mjs'],{stdio:'inherit'}).status??0; } catch {}\""
          }
        ]
      }
    ]
  }
}

The Node command picks the highest numeric semver directory under the cache and passes the hook payload through inherited stdin. It is a silent no-op if no install is present.

After either form ​

Fully quit and restart Claude Code to pick up the new hook config; /reload-plugins refreshes plugin files but does not re-register hooks in the current session. After restarting, the next Edit/Write/MultiEdit should fire the hook automatically. Verify with node <plugin-path>/scripts/codex-pair-log.mjs --latest or a new .codex-pair/log.jsonl entry (typical wall clock 5-30s per call).

Note: this workaround is per-developer (project-local) and gitignored. Once Claude Code's plugin-hook dispatch is fixed upstream, you can remove the hooks block and rely on the plugin's own registration again.

Released under the MIT License.