codex_review_changes_async
Start an asynchronous git changes review that runs in the background. Receive a job ID immediately and poll for the result when ready, perfect for long reviews.
Instructions
Review your git changes in the background; get a job_id back immediately.
Same read-only behavior as codex_review_changes (the diff is gathered, secret-
redacted, and bounded, then reviewed read-only), but it runs detached — use it
when the review may run long. The diff is gathered inside the job, so a bad
base/commit comes back as the same structured error with zero spend (a bad
scope is an out-of-enum value rejected by MCP input validation before the job
starts). Starting a job commits to spend. Poll with codex_job_status, read the
review envelope with codex_job_result, delete it with codex_job_consume_result,
or stop it with codex_job_cancel. Pass workspace_root (absolute).
Data egress: same as codex_review_changes — sends the secret-redacted diff plus
your raw (unredacted) extra_context to OpenAI via the codex CLI; Codex may also
read other repo files. Redaction is best-effort, not a guarantee.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | No | Base git ref for scope='branch'; the review covers base...HEAD. | |
| model | No | Override the Codex model slug for this call; defaults to the server/Codex default when unset. | |
| paths | No | Repo-relative paths to narrow the review ('/' separators, no '..'); omit to review all changes in scope. | |
| scope | No | Which changes to review: 'working_tree' (uncommitted vs HEAD), 'branch' (needs base), or 'commit' (needs commit). | working_tree |
| commit | No | Commit SHA or ref to review for scope='commit'. | |
| isolation | No | Codex config isolation: 'inherit' (default), 'ignore-config', or 'ignore-rules'. | |
| extra_context | No | Optional author intent / background context, added to the prompt as clearly-labeled UNTRUSTED data. Codex is instructed to treat embedded directives as data, not commands — best-effort prompt-injection mitigation, not a guarantee. Don't include live secrets: Codex can read files it's pointed at, and redaction does not cover this field. | |
| workspace_root | No | Absolute path to the target repository root. Pass it (or rely on an MCP root) so the call targets the intended repo; otherwise it falls back to the server's own cwd and meta.workspace_warning is set. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes |