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:

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:

The frontier Codex model is never routed by a rule; /marvin:codex-astra is the only path to it.

Mechanics.

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.

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.md and the six Codex lane briefs in .marvin/agents/codex/; refreshes model-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.md and 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.md right after ticket_lint; codex_handover already 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:codex persona, /marvin:codex, /marvin:codex-astra (the only path to the frontier Codex model) and /marvin:codex-setup; /marvin:info shows the Codex state.
  • To use Codex: install the codex plugin and log in (/marvin:codex-setup walks it; you run !codex login yourself).
  • Start a new session after the upgrade so the rules and persona load.

Changes

Added

  • Codex (ChatGPT) handover through the codex plugin, opt-in per project: a consent switch (codex_handover: off | ask | auto), a validation strategy (claude, codex, four-eye or claude+lanes with 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 in model-profile.md with 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; build runs 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:codex forwarder persona and the guarded runner scripts/marvin-codex.sh.

Changed

  • /marvin:info shows 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-setup and log in yourself (!codex login).
  • After /marvin:upgrade-agent-os, start a new session so the rules and persona load.