Files
gstack/test/fixtures/skill-contract/codex
Garry Tanandcapy-ai[bot] de9a7b4adc /review on Codex with OpenAI models no longer blocks a review that ran its adversarial pass (GST-3375) (#4622)
/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.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
2026-11-21 16:54:58 +00:00
..

Codex rollouts for the /review contract (GST-3173)

Real Codex CLI 0.170.0 rollout files, the JSONL a Codex hook payload's transcript_path names. test/skill-contract-codex.test.ts reads them.

Captured on 2026-11-19 with gpt-5.4-mini at low effort, a fresh CODEX_HOME holding gstack's Codex skills, and a two-commit Python repo (main plus a feature branch that adds avg()). Strings over 1,200 characters are trimmed (the start and end are kept), home and checkout paths are renamed under /home/dev, and token and timing records are dropped. Nothing else was edited.

File How it ran What it shows
exec-read-met.jsonl codex exec, told to read the gstack-review SKILL.md with a shell command, with gstack's contract Stop hook on (--dangerously-bypass-hook-trust) a load by cat, an adversarial spawn_agent and a full report: met
exec-read-blocked.jsonl the same, told not to start subagents the hook blocked once (the <hook_prompt> message), then the model ran the pass and fixed the report: met after the block
exec-read-failed-spawn.jsonl codex exec, no gstack hook a spawn_agent that failed (no agent_id) before one that started; a report without Gate edits
app-server-injected-early-exit.jsonl codex app-server, the skill sent as a skill input Codex injects the SKILL.md as a <skill> user message; the run ends "Nothing to review"
exec-mention-not-loaded.jsonl codex exec '$gstack-review ...', with a probe Stop hook that blocked once codex exec passes a typed $gstack-review as plain text, so nothing loads
exec-subagent.jsonl the subagent rollout from the failed-spawn run session_meta.source names the parent thread
exec-sol-spawn-met.jsonl codex exec -m gpt-6.1-sol against a local stub Responses endpoint (no key, GEVA-562), skill injected, gstack's contract Stop hook on Codex serves spawn_agent in its collaboration namespace with a required task_name, and the started agent's result is {"task_name":"/root/adversarial"} with no agent_id; before this reader knew that shape the hook blocked a met review once

Two files are synthetic, not captured (GST-3375). Codex encrypts the message of a collaboration spawn_agent call for OpenAI models (openai/codex#26210), and a stub endpoint can't produce that, so they were built by hand from exec-sol-spawn-met.jsonl in the shapes that pull request documents. The ciphertext is made-up bytes in the gAAAAAB token format.

File Built from What it shows
exec-sol-encrypted-spawn.jsonl exec-sol-spawn-met.jsonl up to the first Stop, with the spawn message replaced by ciphertext, the encrypted agent_message task record added, and the adversarial agent's plaintext final answer before the report the adversarial pass ran, named adversarial, but the brief's text is nowhere in the rollout
exec-sol-encrypted-subagent.jsonl hand-written the adversarial agent's own rollout: its task arrives as encrypted_content, and session_meta.source names it /root/adversarial

stop-payloads.json holds the three Stop payloads Codex sent gstack's hook in the first two runs, and what the hook printed.