Skip to main content
Glama

Review workspace changes with Codex

codex_review

Review uncommitted workspace changes in a read-only sandbox, returning findings ordered by severity and a session ID for continued follow-up.

Instructions

Ask Codex to review the uncommitted changes in a workspace (read-only sandbox, no files modified). Returns findings ordered by severity plus a sessionId usable with codex_continue.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdYesAbsolute path of the workspace to review
focusNoOptional focus for the review, e.g. "security of the auth module"
modelNoCodex model override
scopeNoDeclared task scope. Findings gain `inScope` and reviewFindings gains `outOfScopeCount`; nothing is dropped, so an out-of-scope defect is still reported.
terminalNoOpen a Terminal window streaming live progress (default: env CODEX_MCP_TERMINAL=1)
timeoutMsNoMax execution time per attempt in ms; auto-resume may add attempts (default: 60 minutes)
writeNotesNoPersist a markdown summary of this run to <cwd>/.codex-flow/notes/<sessionId>.md (default false).
baselineRefNoOptional git ref to review from: Codex reviews `git diff <baselineRef>..HEAD` plus current uncommitted changes, so checkpoint/merge commits made since the baseline are covered.
reasoningEffortNoReasoning effort override for the selected model

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
diffYes
runIdYes
usageYes
errorsYes
statusYes
stderrYes
abortedYes
liveLogYes
acceptedYes
attemptsNo
commandsYes
exitCodeYes
timedOutYes
warningsYes
notesPathYes
sessionIdYes
turnCountYes
redactionsNo
attributionYes
fileChangesYes
parseErrorsYes
agentMessageYes
verificationNo
resumeReasonsNo
sawCompletionYes
schemaVersionYes
unknownEventsYes
reviewFindingsNo
outputTruncatedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed18 schema fields changedv0.25.0
    • addedInput schema / properties / scope
      Added value: +{
      +  "description": "Declared task scope. Findings gain `inScope` and reviewFindings gains `outOfScopeCount`; nothing is dropped, so an out-of-scope defect is still reported.",
      +  "properties": {
      +    "contract": {
      +      "description": "The task contract the reviewer should check conformance against (max 4000 chars).",
      +      "maxLength": 4000,
      +      "type": "string"
      +    },
      +    "files": {
      +      "description": "Paths the task is allowed to touch, relative to cwd (1-200 entries).",
      +      "items": {
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "maxItems": 200,
      +      "minItems": 1,
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "files"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / accepted
      Added value: +{
      +  "type": "boolean"
      +}
    • removedOutput schema / properties / agentMessage / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / agentMessage / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / commands / items / properties / exitCode / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / commands / items / properties / exitCode / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / exitCode / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / exitCode / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / liveLog / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / liveLog / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / notesPath / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / notesPath / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • addedOutput schema / properties / redactions
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / reviewFindings
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "dropped": {
      +      "type": "number"
      +    },
      +    "droppedReasons": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "findings": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "expected": {
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "file": {
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "inScope": {
      +            "type": "boolean"
      +          },
      +          "line": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          "observed": {
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "severity": {
      +            "enum": [
      +              "CRITICAL",
      +              "HIGH",
      +              "MEDIUM",
      +              "LOW"
      +            ],
      +            "type": "string"
      +          },
      +          "summary": {
      +            "minLength": 1,
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "severity",
      +          "file",
      +          "line",
      +          "summary",
      +          "expected",
      +          "observed"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "improvements": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "file": {
      +            "type": "string"
      +          },
      +          "id": {
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "summary": {
      +            "minLength": 1,
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "summary"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "outOfScopeCount": {
      +      "maximum": 9007199254740991,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "parseError": {
      +      "type": "string"
      +    },
      +    "parsed": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "parsed",
      +    "findings",
      +    "improvements",
      +    "dropped",
      +    "droppedReasons"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / properties / sessionId / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / sessionId / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • addedOutput schema / properties / verification
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "command": {
      +          "type": "string"
      +        },
      +        "durationMs": {
      +          "type": "number"
      +        },
      +        "exitCode": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "outputTail": {
      +          "type": "string"
      +        },
      +        "passed": {
      +          "type": "boolean"
      +        },
      +        "redactions": {
      +          "type": "number"
      +        },
      +        "skipped": {
      +          "enum": [
      +            "aborted",
      +            "run-failed"
      +          ],
      +          "type": "string"
      +        },
      +        "timedOut": {
      +          "type": "boolean"
      +        }
      +      },
      +      "required": [
      +        "command",
      +        "exitCode",
      +        "timedOut",
      +        "durationMs",
      +        "outputTail",
      +        "passed"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "sessionId",
      -  "agentMessage",
      -  "fileChanges",
      -  "commands",
      -  "usage",
      -  "errors",
      -  "parseErrors",
      -  "unknownEvents",
      -  "sawCompletion",
      -  "warnings",
      -  "turnCount",
      -  "schemaVersion",
      -  "status",
      -  "runId",
      -  "diff",
      -  "attribution",
      -  "exitCode",
      -  "timedOut",
      -  "aborted",
      -  "outputTruncated",
      -  "stderr",
      -  "liveLog",
      -  "notesPath"
      -]New value: +[
      +  "sessionId",
      +  "agentMessage",
      +  "fileChanges",
      +  "commands",
      +  "usage",
      +  "errors",
      +  "parseErrors",
      +  "unknownEvents",
      +  "sawCompletion",
      +  "warnings",
      +  "turnCount",
      +  "schemaVersion",
      +  "status",
      +  "accepted",
      +  "runId",
      +  "diff",
      +  "attribution",
      +  "exitCode",
      +  "timedOut",
      +  "aborted",
      +  "outputTruncated",
      +  "stderr",
      +  "liveLog",
      +  "notesPath"
      +]
  2. Changed4 schema fields changedv0.13.0
    • addedInput schema / properties / baselineRef
      Added value: +{
      +  "description": "Optional git ref to review from: Codex reviews `git diff <baselineRef>..HEAD` plus current uncommitted changes, so checkpoint/merge commits made since the baseline are covered.",
      +  "maxLength": 256,
      +  "minLength": 1,
      +  "pattern": "^[A-Za-z0-9_][A-Za-z0-9_./@{}^~-]*$",
      +  "type": "string"
      +}
    • addedInput schema / properties / reasoningEffort
      Added value: +{
      +  "description": "Reasoning effort override for the selected model",
      +  "enum": [
      +    "minimal",
      +    "low",
      +    "medium",
      +    "high",
      +    "xhigh"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / timeoutMs / description
      Previous value: -"Max execution time in ms (default: 30 minutes)"New value: +"Max execution time per attempt in ms; auto-resume may add attempts (default: 60 minutes)"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "aborted": {
      +      "type": "boolean"
      +    },
      +    "agentMessage": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "attempts": {
      +      "type": "number"
      +    },
      +    "attribution": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": false,
      +          "properties": {
      +            "files": {
      +              "items": {
      +                "additionalProperties": {},
      +                "properties": {},
      +                "type": "object"
      +              },
      +              "type": "array"
      +            },
      +            "untracked": {
      +              "items": {
      +                "additionalProperties": {},
      +                "properties": {},
      +                "type": "object"
      +              },
      +              "type": "array"
      +            }
      +          },
      +          "required": [
      +            "files",
      +            "untracked"
      +          ],
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "commands": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "command": {
      +            "type": "string"
      +          },
      +          "exitCode": {
      +            "anyOf": [
      +              {
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          }
      +        },
      +        "required": [
      +          "command",
      +          "exitCode"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "diff": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": false,
      +          "properties": {
      +            "patch": {
      +              "type": "string"
      +            },
      +            "status": {
      +              "type": "string"
      +            },
      +            "statusTruncated": {
      +              "type": "boolean"
      +            },
      +            "truncated": {
      +              "type": "boolean"
      +            }
      +          },
      +          "required": [
      +            "status",
      +            "statusTruncated",
      +            "patch",
      +            "truncated"
      +          ],
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "errors": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "exitCode": {
      +      "anyOf": [
      +        {
      +          "type": "number"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "fileChanges": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "kind": {
      +            "type": "string"
      +          },
      +          "path": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "path",
      +          "kind"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "liveLog": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "notesPath": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "outputTruncated": {
      +      "type": "boolean"
      +    },
      +    "parseErrors": {
      +      "type": "number"
      +    },
      +    "resumeReasons": {
      +      "items": {
      +        "enum": [
      +          "timeout",
      +          "transient-turn-failure",
      +          "no-completion-marker"
      +        ],
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "runId": {
      +      "type": "string"
      +    },
      +    "sawCompletion": {
      +      "type": "boolean"
      +    },
      +    "schemaVersion": {
      +      "type": "number"
      +    },
      +    "sessionId": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "status": {
      +      "enum": [
      +        "success",
      +        "partial",
      +        "failed",
      +        "aborted"
      +      ],
      +      "type": "string"
      +    },
      +    "stderr": {
      +      "type": "string"
      +    },
      +    "timedOut": {
      +      "type": "boolean"
      +    },
      +    "turnCount": {
      +      "type": "number"
      +    },
      +    "unknownEvents": {
      +      "type": "number"
      +    },
      +    "usage": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": false,
      +          "properties": {
      +            "cachedInputTokens": {
      +              "type": "number"
      +            },
      +            "inputTokens": {
      +              "type": "number"
      +            },
      +            "outputTokens": {
      +              "type": "number"
      +            },
      +            "reasoningOutputTokens": {
      +              "type": "number"
      +            }
      +          },
      +          "required": [
      +            "inputTokens",
      +            "cachedInputTokens",
      +            "outputTokens",
      +            "reasoningOutputTokens"
      +          ],
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "warnings": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "sessionId",
      +    "agentMessage",
      +    "fileChanges",
      +    "commands",
      +    "usage",
      +    "errors",
      +    "parseErrors",
      +    "unknownEvents",
      +    "sawCompletion",
      +    "warnings",
      +    "turnCount",
      +    "schemaVersion",
      +    "status",
      +    "runId",
      +    "diff",
      +    "attribution",
      +    "exitCode",
      +    "timedOut",
      +    "aborted",
      +    "outputTruncated",
      +    "stderr",
      +    "liveLog",
      +    "notesPath"
      +  ],
      +  "type": "object"
      +}
  3. Changed1 schema field changedv0.8.0
    • addedInput schema / properties / writeNotes
      Added value: +{
      +  "description": "Persist a markdown summary of this run to <cwd>/.codex-flow/notes/<sessionId>.md (default false).",
      +  "type": "boolean"
      +}
  4. First observedv0.2.0

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations supplied, the description carries the transparency burden and does add meaningful context: the review runs in a read-only sandbox, modifies no files, and produces severity-ordered findings. It does not disclose execution duration, auto-resume behavior, or the writeNotes side effect; the 'no files modified' claim is also slightly broad given that writeNotes can persist a file.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences carry the full message efficiently, with the purpose front-loaded, the safety property in a parenthetical, and the output format plus follow-up hook stated at the end. There is no filler or repetition of schema details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The rich input schema and presence of an output schema mean the description does not need to restate parameter details or return structure. It provides the essential selection context and follow-up path, though explicitly naming execution-style alternatives such as codex_execute would make it fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All 9 parameters are already described in the input schema, including nested fields, defaults, and constraints, so the schema coverage is 100%. The description adds no additional input-parameter meaning beyond referring to the returned sessionId.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb-resource pair: 'review the uncommitted changes in a workspace.' It further distinguishes the tool from execution-style siblings by noting the read-only sandbox and that no files are modified, and it connects to codex_continue via the returned sessionId.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives a clear trigger for when to use the tool: when uncommitted workspace changes should be reviewed by Codex. It also implies a follow-up workflow through codex_continue, but it does not explicitly mention alternatives or when-not conditions, so it stops short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.