openai / openai/codex-plugin-cc

adversarial-review threads are always ephemeral — no way to verify which model actually ran a review

Open
#705 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
33.3k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

Summary

We use adversarial-review as an independent code-review gate and need to verify,
after the fact, which model actually executed the review (guarding against silent
local fallback or misconfiguration). Today that is not possible from the job artifacts:

  • adversarial-review starts its thread with ephemeral: true unconditionally
    (scripts/codex-companion.mjs, review path passes no persistThread), so no
    rollout is written under ~/.codex/sessions/.
  • The persisted job record only stores the requested model (request.model),
    not the model that actually served the turn.
  • task threads, by contrast, set persistThread: true and do write rollouts.

We currently work around this by correlating the job's threadId against the
tracing telemetry in ~/.codex/logs_2.sqlite (span attribute model= on
sampling-request spans), which does cover ephemeral threads — but that is an
internal format we would rather not depend on.

Requests

  1. Opt-in persistence for review threads — e.g. adversarial-review --persist-thread (or persist by default), so a rollout exists for audit.
  2. Document the existing --model flag for adversarial-review — the parser
    accepts and forwards it today, but help text does not mention it.
  3. Add --effort to adversarial-review — currently it silently inherits the
    value from ~/.codex/config.toml, which makes review runs non-reproducible
    across machines.
  4. Expose the effective runtime model in the job result — ideally also the
    response.model returned by the Responses API for each sampling request (or an
    execution receipt), with a clear distinction between requested_model,
    effective_runtime_model, and response_model.
  5. Keep the current outputSchema (structured verdict) — it is a strength of the
    review path; none of the above should require dropping it.

Environment

  • plugin openai-codex / codex 1.0.6 (Claude Code marketplace)
  • measured on macOS, Codex CLI with app-server transport

Why it matters

A review gate is only as trustworthy as its provenance. Without any persisted
artifact tying the review thread to the model that actually ran it, "review by
model X" is a request, not a fact. Structured Outputs plus a persisted model
receipt would make adversarial-review fully auditable.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in scripts/codex-companion.mjs and trace the adversarial-review path, its argument parser, thread creation, and persisted job result. Compare it with the task path's persistThread behavior, then inspect the existing request.model handling and Responses API sampling results. Done means the requested review options, persisted audit artifact, and requested/effective/response model distinctions are documented and tested without removing outputSchema.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli, observability, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.