Skip to content

/review on Codex with OpenAI models no longer blocks a review that ran its adversarial pass (GST-3375) - #4622

Merged
capy-ai[bot] merged 2 commits into
mainfrom
codex-review-check-counts-encrypted-adversarial-pass
Nov 21, 2026
Merged

capy-ai[bot] merged 2 commits into
mainfrom
codex-review-check-counts-encrypted-adversarial-pass

Conversation

@garrytan

@garrytan garrytan commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

/review on Codex no longer blocks or logs a miss for sessions that really ran the adversarial review, when the model is an OpenAI one.
Why: Codex encrypts the message it sends a new subagent for OpenAI models, so the check never saw the review brief's text; it now accepts a started subagent named adversarial whose message is encrypted.
Nothing to do: Claude Code's check is unchanged, and a plaintext, missing, failed or differently named subagent still counts as missing.

What changed

Codex users running /review on an OpenAI model hit an end-of-session block that said the adversarial pass never ran, even when it had, and the session then logged a miss. The check read the spawned agent's message for the brief's text, but Codex encrypts that message for OpenAI models (openai/codex#26210). Now a started spawn_agent named adversarial whose message is encrypted counts as the pass, so those sessions finish cleanly. On Codex, /review's Done means list asks for that name, and the block text names it too. A plaintext message is still held to the brief's text, and Claude Code's check doesn't change. The Codex wording was kept short so the generated Codex /review skill stays at its size limit.

Tests
  • Full free suite in CI at 0f0f27a (run 44924286621): 1732 test files passed.
  • macOS and Windows checks at 0f0f27a: cso-macos-launcher, macos-named-regressions (run 44924286621) and windows-smoke (run 44924286587) passed.
  • bun test test/skill-contract-codex.test.ts test/skill-contract.test.ts test/skill-descriptions.test.ts test/skill-md-size-guard.test.ts: 189 tests passed. The new encrypted-spawn tests failed on main (3 of 10).
Why

"The adversarial pass ran, but the check blocked the session anyway." With OpenAI models on Codex the brief's text is encrypted, so the check could never see it. It now trusts the agent's name when the message is encrypted, and still reads the text when it isn't.

Blast radius

The change touches the Codex session reader, the contract checker, the /review contract and its generated Done means text on every host. Claude Code's path only gains an unused optional field, because its check reads sealed only on the Codex branch (lib/skill-contract.ts:379, file read). The generated Claude Done means text is byte-identical to main, and the Codex /review skill is 104,052 characters, exactly at its size pin (size guard test ran).

Pre-Landing Review

Pre-Landing Review: 2 issues — 0 auto-fixed, 1 asked (0 fixed, 1 skipped), 0 deferred, 1 noted. Neither blocks: both are below the blocking floor.

The second-model review (GPT-6.1 Sol) found nothing and recommended merging. The adversarial pass found five low-severity notes and recommended shipping as is; none blocks.

Review notes

Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.

  • INFORMATIONAL sf-d75b3c37ff96 security finding, details recorded privately
  • INFORMATIONAL hosts/codex.ts:9 Codex dispatch step does not name task_name adversarial; only Done means does (same as p1/specialist-batched#1).
  • INFORMATIONAL lib/skill-contract.ts:379 Any sealed spawn named adversarial meets adversarial-pass whatever brief it carried (documented limit of encrypted rollouts).
  • INFORMATIONAL lib/codex-rollout.ts:53 CIPHERTEXT regex is anchored with no trim; a padded or reformatted token fails closed to the old block.
  • INFORMATIONAL lib/codex-rollout.ts:255 sealed set from message shape alone in every namespace (same class as p1/specialist-batched#2).
  • INFORMATIONAL docs/skill-routing-and-contracts.md:124 Docs omit task_name's first-character and 64-char limits; regex duplicated in two validators.
Exploratory QA

Functional smoke on the contract checker CLI, two probes on the changed path, both pass: gstack-skill-contract check on the encrypted-spawn fixture meets the adversarial pass (exit 0), and the same fixture with the agent renamed adversarial_review is reported missing (exit 1) with a fix line that names task_name "adversarial". Not probed: a plaintext message shaped like an encrypted token (listed in Review notes).

Eval Results

Not run. The eval selector picked more than 100 behavioral probes, because the contract checker is used by every skill session, which is far over this PR's $10 paid-run budget. Coverage of the prompt change is left to the scheduled release eval run.

Scope Drift

Scope Check: CLEAN. Intent: count Codex's encrypted adversarial spawn as /review's adversarial pass. Delivered: that, plus the docs, the changelog fragment, two synthetic fixtures and tests.

TODOS

No TODO items completed in this PR.

Documentation

Status: current. No documentation edits were needed.

Scope: bd77c8c..0f0f27a (2 commits, 13 files), with no staged, unstaged or new files. The changed surface is a new optional task_name field on agent_dispatch contract items: an encrypted Codex spawn_agent named adversarial now counts for /review's adversarial pass.

Documentation health:

  • docs/skill-routing-and-contracts.md: current. It covers the encrypted spawn and the task_name field.
  • test/fixtures/skill-contract/codex/README.md: current. It describes both synthetic fixtures.
  • review/SKILL.md.tmpl: current. Its contract carries task_name: adversarial.
  • review/sections/adversarial.md: current. No change needed.
  • changelog.d/codex-review-check-counts-encrypted-adversarial-pass.md: accurate and not edited.

Coverage debt: none. The reference for task_name is in docs/skill-routing-and-contracts.md, and no how-to is needed for an internal contract field. Diagram drift: none.

Agent notes

Lane GSTA-718 for GST-3375, relayed from GEVA-562's Codex hooks pilot (GPT-6.2 Sol, Codex CLI 0.170.0). No eval rollout content is committed.

Refs GST-3375

Approvals

No approvals recorded for branch codex-review-check-counts-encrypted-adversarial-pass.
Plan: exempt: bug fix (--kind fix); failing-first test in test/skill-contract-codex.test.ts
Plan check: exempt bug fix

REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=6 fixed=0 scope=frozen ledgers_read=3 dispatches=4
Gate edits: none detected (9 listed, 1 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
Evals: not run; eval:select picked 100+ behavioral probes, over the $10 paid-run cap.
Images: none attached (no visible surface; text only).

🤖 Generated with Claude Code

{
  "schema_version": 1,
  "pr": 4622,
  "head": "0f0f27a07b73e6d652fc4af05d072cbfde6bcfa1",
  "version": "1.102.1.0",
  "base": "main",
  "gate": {
    "free": {
      "pass": 1732,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "free",
      "run": 44924286621,
      "attempt": 1,
      "tree": "b677702e290e2f0f3295bf4688ca509bb01c16c0"
    }
  ],
  "calls": 14,
  "session_kind": "unattended",
  "run": "/home/user/.capy/work/ship-4622",
  "head_tree": "b677702e290e2f0f3295bf4688ca509bb01c16c0",
  "product_patch_id": "1afd378fc4e15a3c663da1e9fc54547b15899a45",
  "gstack_version": "1.102.1.0",
  "review_depth": {
    "depth": "light",
    "class": "code",
    "runtime_lines": 81,
    "rules": "85b3923b1a978e41",
    "base": "bd77c8ccaa373e3a072ef3d9f4839edae16b46f0",
    "registry": "bd77c8ccaa373e3a072ef3d9f4839edae16b46f0",
    "gate_scan": {
      "tagged": 0,
      "head": "0f0f27a07b73e6d652fc4af05d072cbfde6bcfa1"
    },
    "reasons": [
      "runtime=81"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @b677702e290e (8 checks, current for 0f0f27a07b73)",
  "requires_remote": [
    "free-tests.yml/cso-macos-launcher: https://github.com/garrytan/gstack/actions/runs/44924286621/attempts/1",
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/44924286621/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/44924286587/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=b677702e290e tests=38698 skipped=104 runs=44924286621/1 profiles=ci-reuse/free-tests heads=0f0f27a07b73 verified=2026-11-21T16:38:06.422Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/, README.md, CLAUDE.md, AGENTS.md, CONTRIBUTING.md and the changed review/ and test fixture docs"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 6,
    "fixed": 0,
    "scope": "frozen",
    "rounds": 1,
    "ledgers_read": 3,
    "dispatches": {
      "specialist": 3,
      "red-team": 1
    }
  },
  "gate_dispositions": []
}
{"head":"0f0f27a07b73e6d652fc4af05d072cbfde6bcfa1","run":"ship-4622","status":"started","review_loop":{"passes":1,"blocking_found":0,"deferred":0,"noted":1,"fixed":0,"scope":"frozen","rounds":1,"dispatches":{"specialist":3,"red-team":1}}}

Open in Capy

…n its adversarial pass (GST-3375)

Codex encrypts the message it sends a new subagent for OpenAI models, so the contract check never saw the adversarial brief. On Codex, a started subagent named adversarial whose message is encrypted now meets the item; plaintext, missing, failed or differently named subagents still miss, and Claude Code is unchanged.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@trunk-io

trunk-io Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

The Codex Done-means line for the adversarial pass now names the task name in the same length as the line it replaces, so the generated Codex SKILL.md stays at its exact size pin.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot merged commit de9a7b4 into main Nov 21, 2026
57 checks passed
@garrytan garrytan mentioned this pull request Nov 21, 2026
capy-ai Bot added a commit that referenced this pull request Nov 21, 2026
- Habits from nine teams, written into gstack. (#4585)
- Three more habits from teams that run evals. (#4602)
- The /ship conductor trial plan gives its real-problem judge one more attempt on fresh labels after it missed its agreement bar twice, and stops the trial incomplete if it misses again (GST-3003). (#4611)
- The /ship conductor trial plan now stops a trial only at the final remote-gate refusal, gives both arms the same note that the brief overrides team rules, and counts every report the no-gstack arm returns (GST-3003). (#4609)
- The /ship conductor trial plan now ends a trial at the remote gate when its case base isn't main, gives the no-gstack arm a test runner, and audits every trial for exposure to the plan (GST-3003). (#4605)
- The /ship conductor trial plan now runs an uncounted pilot in every arm before its counted trials and takes one planned look at half the cases (GST-3003). (#4587)
- gstack's own use on Capy can be counted, and is kept out of real-use numbers. (#4576)
- Free Tests shards finish closer together. (#4578)
- The weekly test-time recording can land again on its own. (#4581)
- The job-log tree.json step's recommended sleep is long enough for real runners. (#4589)
- Pull requests no longer wait on the Trunk flaky-test upload, and the quick tier's flaky passes now reach Trunk. (#4579)
- Windows Setup E2E finishes sooner on install changes. (#4575)
- Skills no longer stop on Codex when they clean up temp files. (#4612)
- /review on Codex with OpenAI models no longer holds back a review that ran its adversarial pass. (#4622)
- Crew threads on Capy now check in at 500M own tokens, standing threads rotate at 250M and any subagent past 50M gets a look, half the old lines, because Capy's token counts read about half what they did before 2026-11-15. (#4582)
- gstack no longer offers to add a `## Skill routing` section to your project's CLAUDE.md. (#4629)
- The README and docs no longer say gstack makes your agent fix more bugs. (#4598)
- `/eval-plan` now writes eval plans that waste less money. (#4591)
- /cso checks every folder above a source file before it looks at the file, so it never looks through a symlinked folder. (#4592)
- Plan reviews no longer read a /design-review audit summary as the branch's design doc. (#4623)
- Node's built-in test files now run with `node --test` in repos that use vitest or jest. (#4626)
- A quarantined test that the runner skipped now fails the run instead of passing it. (#4590)
- A flaky free test is fixed: the spawnSync overflow check no longer fails about once an hour on CI. (#4613)
- Free Tests runs its shards on 16-core runners. (#4600)
- /office-hours asks for ground truth first. (#4468)
- Every startup session ends with a dated test. (#4468)
- /plan-tune's dream cycle now logs each send of your typed answers to Anthropic. (#4621)
- Landing a ready PR no longer depends on a hand-copied gate decision, and the ready note, release PR and squash message say the right thing. (#4596)
- /ship no longer asks for a fresh review because of a stacked parent that main already had. (#4580)
- Results PRs with large captured agent sessions can be reviewed. (#4574)
- /ship no longer stalls on review notes a reviewer already cleared, counts review rounds the way the review policy reads them, and keeps security findings out of the PR body. (#4595)
- /ship's review readers are now told never to stop processes they didn't start. (#4607)
- /ship's review no longer stops when Capy's own drive sync database grows past 100 MB. (#4606)
- /ship's preflight now honors your repository's time limit for rerunning CI-skipped tests, and tells you when a fresh worktree needs its packages installed. (#4608)
- The slowest free test file is now six files. (#4588)
- Step 11.5 keeps a reviewed head current across base-only merges. (#4577)
- On a Capy install, only the owner's opt-in sends telemetry. (#4597)
- New page: working across agent systems. (#4583)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant