v0.40.0 — Codex (ChatGPT) third-party validation
Consumers act once: run claude plugin update marvin, follow the update procedure the SessionStart notice prints (upgrades/v0.40.0.md), and answer the upgrade's Codex question — or leave it unanswered, which keeps Codex off.
Why. Marvin's validators are fresh Claude agents; a second vendor sees what one model family systematically misses. Marvin now hands work to OpenAI Codex through the codex Claude Code plugin. A project that never opts in sees no change and no Codex call.
Settings. Four PROJECT-INFO keys, owned by .marvin/agents/codex.md:
codex_handover: off | ask | autois the consent for every automatic handover. Underask, only the question tool's own answer counts; no answer means no handover.validation_strategy: claude | codex | four-eye | claude+lanespicks which validation lanes run on Codex, andcodex_laneslists them forclaude+lanes. In four-eye, Claude runs first and Codex tags each findingnew,recurring,regressionordup; a stage passes when both pass; otherwise each FAIL-grade finding is judged against the DoD and the brief, and one outside both is overruled with a follow-up. A security FAIL is never overruled by the orchestrator.codex_evidence: claude | codexdecides who runs the real checks. Codex's default sandbox has no network, browser or Docker, so acodexevidence run that needs them falls back to Claude evidence for that run.
Auto debug. Three tollgates hand the situation to a read-only Codex diagnosis: a Stuck signal and the max gate on the Claude escalation ladder, and an off-ladder validator failing twice. Each fires at most once per task.
Codex builds run only on the architect's command (/marvin:codex build), on their own ladder:
- rungs: the fast Codex tier at
high, then the workhorse atmedium,high,xhigh, then a user gate (hand back to the Claude ladder,/marvin:codex-astra, or stop); - a Codex-built round is always validated by Claude;
- the
marvin:codexforwarder works in its own worktree and commits for Codex.
The frontier Codex model is never routed by a rule; /marvin:codex-astra is the only path to it.
Mechanics.
scripts/marvin-codex.shis the only thing that touches the companion:check,runandresultwith guards (handover off, frontier without--astra, effort abovexhigh, write access only for builds and review/security evidence runs) and a whole-run budget that returnspending <id>before the tool limit.- A Codex run with no usable verdict counts as unavailable, never as a FAIL; the lane falls back to Claude, and work never stalls.
- Install step 6c and upgrade step 4a ask the settings;
/marvin:codex-setupchecks availability and walks the install, asking before each step. Marvin never logs in for you.
Models. On a ChatGPT login the Codex service rejected gpt-6.1-sol and gpt-6-luna (HTTP 400) in a live probe on 2026-10-16. The Codex profile therefore uses gpt-5.6-sol and gpt-5.6-luna, which completed; the frontier row keeps gpt-6-astra, unverified on that login.
Acceptance.
- Rule-5 scratch install from the branch (
claude -p --model haiku, Local tracker, 2026-10-16): the answersask,claude+lanes,[review, security]andclaudelanded in PROJECT-INFO afterticket_lint, the Codex rules and six lane briefs were installed, and the kit core stayed at 55 lines. - Live replay in that repo:
- with
codex_handover: off, an orchestrator-path run was refused (exit 3); /marvin:codex review --base mainstill ran, because the architect's command is the consent. Real Codex (gpt-5.6-sol,high, read-only) found both seeded defects, the result mapped toCODEX: FAIL (review), and the forwarder's final message passed the SubagentStop gate.
- with
- The install report omitted the 6c availability line, and the haiku install again left unrelated placeholders (AOS-221); both are follow-ups (AOS-241, AOS-221).
Follow-ups: AOS-238 (test hardening), AOS-239 (robustness edge cases), AOS-240 (wording polish), AOS-241 (install report check line).
This note's scope: was derived over v0.39.0..HEAD, non-merge commits only; the container epic AOS-232 is excluded.
Upgrade
Consumer-facing: Marvin can hand validation, diagnosis and architect-commanded builds to OpenAI Codex through the codex plugin — opt-in, off until you choose. Rules: .marvin/agents/codex.md.
- Update with the procedure the SessionStart notice prints. No file moves, so no migration script.
- The upgrade adds
.marvin/agents/codex.mdand the six Codex lane briefs in.marvin/agents/codex/; refreshesmodel-profile.md(new Codex profile),escalation.md,escalation-ladder.md,validation-agent.md,visual-validation.md,planning-research.md,guardrails.md,token-economics.md,information-guide.mdand the kit core.marvin/CLAUDE.marvin.md(customised copies are backed up first). - Do NOT write the Codex keys in this step. The upgrade's step 4a ASKS the Codex round once (
codex_handover, ask recommended; the validation strategy and lanes;codex_evidence) and writes the four keys into.marvin/PROJECT-INFO.mdright afterticket_lint;codex_handoveralready present suppresses the question, and any other missing Codex key is added at its default. No answer →off/claude/[]/claude, which changes nothing. - New plugin pieces: the
marvin:codexpersona,/marvin:codex,/marvin:codex-astra(the only path to the frontier Codex model) and/marvin:codex-setup;/marvin:infoshows the Codex state. - To use Codex: install the
codexplugin and log in (/marvin:codex-setupwalks it; you run!codex loginyourself). - Start a new session after the upgrade so the rules and persona load.
Changes
Added
- Codex (ChatGPT) handover through the
codexplugin, opt-in per project: a consent switch (codex_handover: off | ask | auto), a validation strategy (claude,codex,four-eyeorclaude+laneswith chosen lanes) and an evidence setting (codex_evidence), owned by.marvin/agents/codex.md. - Six Codex lane briefs (plan, review, security, design, diagnose, build) in
.marvin/agents/codex/, and a Codex profile inmodel-profile.mdwith each lane's model and effort. - Auto-debug tollgates: a Stuck signal and the max gate on the Claude escalation ladder, and an off-ladder validator failing twice, ask Codex for a read-only diagnosis.
/marvin:codex <lane>(architect-commanded handover;buildruns the Codex build ladder),/marvin:codex-astra(the only path to the frontier Codex model) and/marvin:codex-setup(availability check and an install runbook that asks before each step).- The
marvin:codexforwarder persona and the guarded runnerscripts/marvin-codex.sh.
Changed
/marvin:infoshows the Codex status and the four Codex settings.- Install asks the Codex round in step 6c, and upgrade asks it once in step 4a; with no answer, the defaults change nothing.
Security
- Codex runs read-only except for an architect-commanded build or a review/security evidence run. Effort is capped at
xhigh, the frontier model is reachable only via/marvin:codex-astra, a security FAIL is never overruled by the orchestrator, and an evidence run that changes tracked code is discarded.
Action needed
- Answer the upgrade's Codex question (or leave it unanswered to keep Codex off); to use Codex, run
/marvin:codex-setupand log in yourself (!codex login). - After
/marvin:upgrade-agent-os, start a new session so the rules and persona load.