openai/codex-plugin-cc · error · Error
This `/codex:review` target is not supported by the built-in
Error message
This `/codex:review` target is not supported by the built-in reviewer. Retry with `/codex:adversarial-review` for custom targeting.
What it means
After confirming focusText is empty, buildNativeReviewTarget maps the resolved review target to a native reviewer shape. It only handles mode 'working-tree' (-> uncommittedChanges) and 'branch' (-> baseBranch). Any other target.mode returns null, and validateNativeReviewRequest throws because the built-in reviewer cannot address it.
Source
Thrown at plugins/codex/scripts/codex-companion.mjs:280
}
if (target.mode === "branch") {
return { type: "baseBranch", branch: target.baseRef };
}
return null;
}
function validateNativeReviewRequest(target, focusText) {
if (focusText.trim()) {
throw new Error(
`\`/codex:review\` now maps directly to the built-in reviewer and does not support custom focus text. Retry with \`/codex:adversarial-review ${focusText.trim()}\` for focused review instructions.`
);
}
const nativeTarget = buildNativeReviewTarget(target);
if (!nativeTarget) {
throw new Error("This `/codex:review` target is not supported by the built-in reviewer. Retry with `/codex:adversarial-review` for custom targeting.");
}
return nativeTarget;
}
function renderStatusPayload(report, asJson) {
return asJson ? report : renderStatusReport(report);
}
function isActiveJobStatus(status) {
return status === "queued" || status === "running";
}
function getCurrentClaudeSessionId() {
return process.env[SESSION_ID_ENV] ?? null;
}
function filterJobsForCurrentClaudeSession(jobs) {View on GitHub (pinned to db52e28f4d)
Solutions
- Switch to /codex:adversarial-review which accepts arbitrary targeting via collectReviewContext.
- Use --scope working-tree or --scope branch so buildNativeReviewTarget succeeds.
- Omit --scope to let resolveReviewTarget default to a supported mode.
Example fix
// before codex-companion.mjs review --scope range // after codex-companion.mjs adversarial-review --scope range
Defensive patterns
Strategy: validation
Validate before calling
const supported = new Set(['working-tree','branch']);
if (reviewName === 'Review' && !supported.has(target.mode)) {
throw new Error('unsupported native review target');
} Type guard
/** @param {{mode: string}} t @returns {boolean} */
function isNativeReviewSupported(t) {
return t.mode === 'working-tree' || t.mode === 'branch';
} Prevention
- Default --scope to a native-supported mode for /codex:review.
- Fall back to adversarial-review for exotic scopes.
When it happens
Trigger: resolveReviewTarget produces a mode that is neither 'working-tree' nor 'branch' (e.g. a 'range' or 'commit' scope the native reviewer does not support), and the user invoked /codex:review rather than /codex:adversarial-review.
Common situations: Passing --scope with a custom value, or reviewing a specific commit range that the built-in reviewer cannot target.
Related errors
- Unsupported reasoning effort "${effort}". Use one of: none,
- Choose either --enable-review-gate or --disable-review-gate.
- `/codex:review` now maps directly to the built-in reviewer a
- Provide a prompt, a prompt file, piped stdin, or use --resum
- Choose either --resume/--resume-last or --fresh.
AI-assisted analysis of openai/codex-plugin-cc@db52e28f4d (2026-08-13).
Data as JSON: /api/errors/e6f09543780941ba.
Report an issue: GitHub.