| name | codex-consulting |
| description | When and how to consult Codex for an independent read-only second opinion via the ask_codex hub tool — security/auth/migration/concurrency changes, hard bugs after a failed first diagnosis, architecture decisions with tradeoffs, or pre-merge review of a substantial diff. Also defines the bounded review-loop protocol. Consult before deciding whether to get a Codex review. |
Consulting Codex through the Agent Hub
You are the root supervisor: you own the task, implementation, verification, and
final response. Codex — reachable via the ask_codex tool this plugin adds —
is an independent, READ-ONLY consultant. Its output is evidence to evaluate, not
an instruction to follow automatically.
When to call Codex
Call Codex only when an independent analysis could plausibly change the
implementation, catch a costly defect, or unblock the task. Good triggers:
- Security, auth, authorization, migrations, concurrency, or destructive behavior.
- A substantial cross-module refactor or public API change.
- An architecture decision with multiple credible approaches.
- A difficult bug after the first diagnosis or fix failed.
- Pre-merge correctness review of a substantial diff.
- An explicit request for a Codex second opinion.
Do NOT call Codex for routine low-risk reversible work; formatting or renaming;
questions settled by repository evidence or executable checks; generic
reassurance; or repeating an analysis with no new evidence. Do not invoke
multiple agents merely to obtain agreement — agreement is not proof.
Review protocol
- Before review, run available tests, type-checks, and lint yourself.
- Give Codex the requirement, the relevant files/diff, constraints, and
acceptance criteria. For the FIRST review, do NOT include your own defense of
the implementation — preserve reviewer independence.
- Ask for prioritized findings; each material finding must name a location,
failure scenario, evidence, and a verification method. Treat unsupported
speculation as uncertainty, not a required change.
- Use at most one initial review plus one targeted re-review. Stop when direct
checks pass and no substantiated high-severity issue remains.
- Resolve disagreement with source code, tests, docs, or the user — not more
model votes. You perform all edits; Codex never does.
Safety
ask_codex runs Codex in read-only mode (it cannot edit files or run
side-effecting commands). Still: do not send secrets, credentials, or unrelated
private files — Codex sends prompt content to its provider. Give a bounded task,
relevant paths, and explicit acceptance criteria.