Skip to content

feat(#497): CodexDriver core — subprocess codex exec --json, SDK-typed parser, three-level outcome evaluator #1058

Closed

Description

@admarble

Epic: #497 Blocked by: — (none; #674, #862, #505 closed) Tier: judgment Doc: docs/investigations/codex-driver-probe-2026-09.md §AC-1, §AC-4–7, "Parser gotchas", "What changes in #497" Graph node: 1 of 3

Summary

The driver half of #497, scoped to pure TypeScript with no init/template changes. Spawns codex exec --json as a subprocess (not the Codex SDK class — the hook-trust flag is CLI-only and the SDK cannot pass it; see doc §AC-5), parses the JSONL stream against @openai/codex-sdk's exported types, and evaluates the outcome with the three-level error model the probe established. Mirrors OpencodeDriver's buildOpencodeArgs / OpencodeStreamParser / evaluateOpencodeRun split.

Design constraints (from the probe — do not re-derive)

Acceptance criteria

  • AC-1: parses the recorded fixture — Verify: npx vitest run src/lib/workflow/drivers/codex.test.ts -t "497 AC-1" → passes on src/lib/workflow/drivers/__fixtures__/codex-exec-skill-hook.jsonl; asserts concatenated agent_message.text → output, thread.started.thread_id → resumeHandle.token, turn.completed.usage → modelUsage[<model>] with the five counters mapped, and the three item.completed/error items do not set success: false.
  • AC-2: spawn contract — Verify: -t "497 AC-2": buildCodexArgs yields exactly the flag set above; spawn options carry stdio: ["ignore", "pipe", "pipe"], detached: true, config.env forwarded unchanged; abortSignal → SIGTERM on the process group; stderrTail/stdoutTail populated via RingBuffer; exitCode set.
  • AC-3: three-level outcome — Verify: -t "497 AC-3": fixture mutations — (a) turn.failed → failure with structuredError; (b) top-level {"type":"error"} → failure; (c) exit≠0 with no turn.completed → failure with distinct code; (d) an added item.completed/error alone → still success. Each mutation recorded per the gate-test rule (Mutation-verified: marker in the PR body).
  • AC-4: resume honors refactor: normalize agent-driver resume semantics (origin-cwd-bound ResumeHandle, driver-owned validation) #674 — Verify: npx vitest run src/lib/workflow/drivers/resume-semantics.test.ts -t "codex" → ResumeHandle{driver:"codex", token, originCwd} round-trips; canResume is false for a different cwd; when it resumes, args are exec resume <token> --json … and -C is never passed to resume.
  • AC-5: registry + settings + CLI — Verify: npx vitest run src/lib/workflow/drivers/index.test.ts -t "497" asserts getDriver("codex"); CodexSettings { model?, sandboxMode?, extraArgs? } on RunSettings.codex; node dist/bin/cli.js run 1 --agent codex --dry-run (after npm run build) prints the codex driver in its plan without spawning.
  • AC-6: warnings surfaced, not swallowed — Verify: -t "497 AC-6": item.completed/error messages are forwarded to config.onStderr (or a warnings field) so the hook-trust banner is visible in verbose logs.
  • AC-7: live SKIP-when-absent — Verify: codex.live.integration.test.ts gated on CODEX_LIVE=1: when the binary resolves and (CODEX_API_KEY or codex login status = logged in), runs a trivial exec with a $-less prompt and asserts ≥1 agent_message; otherwise reports SKIPPED (codex absent), never a pass.
  • AC-8: SDK is types-only — Verify: @openai/codex-sdk appears in devDependencies only (or its .d.ts is vendored); grep -r "codex-sdk" dist/ | wc -l → 0 after build.
  • AC-9: execution-config parity — Verify: npx vitest run src/lib/workflow/execution-config-parity.test.ts passes with codexSettings asserted equal across both producers (buildExecutionConfig and ready-gate.ts).
  • AC-10: version floor — Verify: CODEX_MIN_VERSION = "0.154.0" exported from codex.ts; isAvailable() parses codex --version and returns false below the floor with a message naming it.

Non-goals

sequant init --agent codex, the .codex/config.toml hooks wrapper, .agents/skills symlink, doctor, README — all node 2. Real-phase quality (does /qa actually work through Codex) — node 3, the human gate. Codex MCP config, subagent mapping, marketplace plugin — deferred until the gate reports.

Related

#497 (epic) · #674 (resume contract) · #862 (opencode driver, the structural template) · #1057 (probe doc)

Activity

  1. added
    enhancement
    planned
    multi-agent
    backlog
    on Sep 14, 2026
  2. admarble commented on Sep 15, 2026

    @admarble
    ContributorAuthor

    Complexity: Complex (10 ACs, 4 directories)

    AC Quality Check

    lintAcceptanceCriteria (src/lib/ac-linter.ts): 9/10 pass. AC-7 is flagged as incomplete — its verificationMethod resolves to integration_test by keyword inference rather than a declared Evidence: clause. Not a real defect: the AC already names the exact gated test file (codex.live.integration.test.ts, CODEX_LIVE=1). Optional: add a trailing Evidence: clause per the constitution's §2 AC format if the author wants it lint-clean.

    Scope Assessment

    Non-Goals: present (## Non-goals) — sequant init --agent codex, .codex/config.toml hooks wrapper, .agents/skills symlink, doctor, README (node 2); real-phase quality validation (node 3); MCP config, subagent mapping, marketplace plugin (deferred to the human gate). performScopeAssessment's bullet-list parser reports this section as "empty" — false negative: the section is prose, not a - list, so the extractor finds zero items even though the boundary is explicit and specific. Not a real gap.

    Metric Value Status
    Feature count 3 (tool) / 1 (judgment) ⚠️/✅
    AC items 10 ⚠️
    Directory spread 7 (tool) / ~4 (judgment) ⚠️/✅

    Verdict: ⚠️→✅ SCOPE_OK, overriding the mechanical SCOPE_SPLIT_RECOMMENDED. The tool's feature-clustering keys on coincidental keyword hits (auth, ui, config, validation) across a single AgentDriver implementation — there is one feature here (CodexDriver), not three. The AC count and file spread are in the same range #862 (OpencodeDriver) shipped as one PR at, following the identical three-function template. Recommend proceeding as one issue rather than splitting.


    Acceptance Criteria

    AC-1: Parses the recorded fixture

    Verification: Unit Test
    Scenario: Given __fixtures__/codex-exec-skill-hook.jsonl fed through CodexStreamParser → When .end() is called → Then agent_message.text items concatenate into output, thread.started.thread_id becomes resumeHandle.token, turn.completed.usage's five counters populate modelUsage[<model>], and the three item.completed/error items do not flip success to false.
    Assumptions: reasoning_output_tokens (5th usage counter) has no dedicated slot on ModelUsageEntry — see Open Question 1.

    AC-2: Spawn contract

    Verification: Unit Test
    Scenario: Given a prompt + AgentExecutionConfig → When buildCodexArgs runs → Then it returns exec --json -C <cwd> -s workspace-write --dangerously-bypass-hook-trust [-m <model>] <prompt>; spawn uses stdio: ["ignore","pipe","pipe"], detached: true, unmodified config.env; abortSignal/timeout SIGTERMs the process group; stderrTail/stdoutTail fill via RingBuffer; exitCode is set.
    Assumptions: Mirrors OpencodeDriver.executePhase's spawn options and killProcessGroup helper verbatim.

    AC-3: Three-level outcome

    Verification: Unit Test
    Scenario: Given the base fixture → When mutated to (a) turn.failed, (b) a top-level {"type":"error"}, (c) exit≠0 with no turn.completed, (d) an extra item.completed/error alone → Then (a)-(c) fail with distinct codes/structuredError, (d) still succeeds.
    Assumptions: Each mutation gets its own Mutation-verified: marker in the PR body per the constitution's gate-test rule — commit before mutating (memory: git checkout wipes uncommitted work 5x already).

    AC-4: Resume honors #674

    Verification: Unit Test
    Scenario: Given a ResumeHandle{driver:"codex", token, originCwd} → When canResume is checked against a different cwd → Then it returns false; when eligible, the dispatched args are exec resume <token> --json --dangerously-bypass-hook-trust <prompt> with no -C.
    Assumptions: Un-skips the two it.skip blocks already scaffolded in resume-semantics.test.ts (lines 236-243).

    AC-5: Registry + settings + CLI

    Verification: Integration Test
    Scenario: Given getDriver("codex") → When called → Then it resolves a CodexDriver; CodexSettings{model?, sandboxMode?, extraArgs?} exists on RunSettings.codex; node dist/bin/cli.js run 1 --agent codex --dry-run prints the codex driver in its plan with no spawn.
    Assumptions: The dry-run print path is resolveDriverName in phase-executor.ts:1255 — it must receive codexSettings, not just aiderSettings/opencodeSettings, or a configured model silently drops from the plan.

    AC-6: Warnings surfaced, not swallowed

    Verification: Unit Test
    Scenario: Given an item.completed/error event (hook-trust banner, model-metadata notice) → When parsed → Then its message reaches config.onStderr (or an equivalent warnings field), visible in verbose logs, without affecting success.
    Assumptions: None beyond AC-1/3.

    AC-7: Live SKIP-when-absent

    Verification: Integration Test (gated, CODEX_LIVE=1)
    Scenario: Given the codex binary resolves and (CODEX_API_KEY set or codex login status reports logged in) → When a trivial $-less prompt runs → Then ≥1 agent_message is asserted; otherwise the test reports SKIPPED (codex absent), never a bare pass.
    Assumptions: Mirrors opencode.live.integration.test.ts's skipReason()/it.skipIf shape exactly.

    AC-8: SDK is types-only

    Verification: Manual / Build Check
    Scenario: Given package.json → When inspected → Then @openai/codex-sdk is devDependencies-only (or its .d.ts is vendored); grep -r "codex-sdk" dist/ | wc -l is 0 after npm run build.
    Assumptions: Only import type statements reach codex.ts — any runtime import (even indirect, via a re-exported const) fails this.

    AC-9: Execution-config parity

    Verification: Unit Test
    Scenario: Given run.agent: "codex" + run.codex settings → When both buildExecutionConfig and ready-gate.ts's buildPhaseConfig resolve an ExecutionConfig → Then codexSettings is byte-identical across both producers.
    Assumptions: Add a codex-configured scenario to execution-config-parity.test.ts's SCENARIOS array (mirrors the existing opencode entry) — the generic unallowedDiffs comparator then catches drift automatically since codexSettings isn't on GATE_OVERRIDES.

    AC-10: Version floor

    Verification: Unit Test
    Scenario: Given codex --version output → When parsed → Then isAvailable() returns false below CODEX_MIN_VERSION = "0.154.0" with a message naming the floor; the constant is exported from codex.ts.
    Assumptions: Reuses compareVersions from src/lib/version-check.ts (NOT doctor.ts's isVersionBelow — importing from commands/ into lib/ would invert the existing layer boundary). Diverges from the opencode/aider precedent, where floor-enforcement lives only in doctor, not in isAvailable() itself — see Design Review Q4.


    Implementation Plan

    Phase 1: Types & settings plumbing

    1. Add CodexSettings { model?: string; sandboxMode?: "read-only"|"workspace-write"|"danger-full-access"; extraArgs?: string[] } to src/lib/settings.ts (mirrors OpencodeSettings at line 129), plus CodexSettingsSchema (zod, mirrors line 476) and validateCodexSettings() (mirrors line 1050). Add codex?: CodexSettings to RunSettings (line 265) and RunSettingsSchema (line 536).
    2. Add codexSettings?: CodexSettings to ExecutionConfig (src/lib/workflow/types.ts:155).
    3. Wire codexSettings: settings.run.codex into buildExecutionConfig (config-resolver.ts:591, alongside opencodeSettings).
    4. Add @openai/codex-sdk to devDependencies (types-only per AC-8).

    Phase 2: CodexDriver core (src/lib/workflow/drivers/codex.ts)

    1. Port the buildXArgs / XStreamParser / evaluateXRun split from opencode.ts, typed against @openai/codex-sdk's ThreadEvent/ThreadItem/Usage (import type only):
      • buildCodexArgs: hardcodes -s workspace-write --dangerously-bypass-hook-trust; wires settings?.sandboxMode and settings?.model (-m) when set (see Open Question 3).
      • CodexStreamParser: tracks agent_message.text → output, thread.started.thread_id → resume token, turn.completed.usage → synthesized modelUsage[model], item.completed/error → warnings array (never fails the run), dedupes command_execution on item.id.
      • evaluateCodexRun: three-level classification — turn.failed / top-level error event / exit≠0-with-no-turn.completed are fatal (each a distinct CODEX_ERROR_CODES entry mirroring OPENCODE_ERROR_CODES); item.completed/error alone is not.
      • CodexDriver implements AgentDriver: name = "codex", resolvesSkills = true, usesSdkMcp = false. executePhase spawns with stdin: "ignore" (AC-7), detached: true, process-group SIGTERM on abort/timeout (reuse killProcessGroup-shaped helper). canResume: handle.driver === "codex" && handle.originCwd === targetCwd; eligible resume drops -C/-s per the design doc. isAvailable(): codex --version parsed via the existing /(\d+)\.(\d+)\.(\d+)/ pattern, compared with compareVersions from ../../version-check.js against CODEX_MIN_VERSION.

    Phase 3: Registry & wiring

    1. Register codex: (opts) => new CodexDriver(opts?.codexSettings) in DRIVERS (drivers/index.ts); add codexSettings?: CodexSettings to DriverOptions.
    2. Pass codexSettings: config.codexSettings into all three getDriver(config.agent, {...}) call sites in phase-executor.ts (lines 1257, 1474, 1925) — currently only aiderSettings/opencodeSettings are threaded through; a codex-configured run would silently instantiate new CodexDriver(undefined) otherwise.

    Phase 4: Tests

    1. codex.test.ts: buildCodexArgs, parser/evaluator against the fixture (AC-1) and its 4 mutations (AC-3, each mutation-verified), warnings forwarding (AC-6), SDK types-only grep (AC-8).
    2. Extend drivers/index.test.ts with getDriver("codex") assertions (AC-5).
    3. Un-skip and implement the two it.skip blocks in resume-semantics.test.ts:236-243 (AC-4).
    4. Add a codex-configured scenario to execution-config-parity.test.ts's SCENARIOS (AC-9).
    5. codex.live.integration.test.ts mirroring opencode.live.integration.test.ts's skip-gate shape (AC-7).

    Design Review

    1. Where does this logic belong? src/lib/workflow/drivers/codex.ts — same layer as every other AgentDriver; no orchestration-layer changes beyond the plumbing already established for aider/opencode.
    2. What's the simplest correct approach? Reuse the exact three-function split OpencodeDriver already validates in production rather than wrapping @openai/codex-sdk's runtime Thread class. Rejected per the probe's own AC-5: the hook-trust flag is CLI-only, Thread._exec is private (no stderrTail/exitCode), and the SDK pins the binary version exactly (the protocol-skew class sequant already hit twice).
    3. What existing pattern does this follow? OpencodeDriver end-to-end: three-function split, RingBuffer tails, process-group SIGTERM, driver-tagged ResumeHandle, *_MIN_VERSION + version-compare floor, *_ERROR_CODES const object.
    4. What would a senior reviewer challenge?
      • reasoning_output_tokens (5th usage counter in AC-1) has no field on ModelUsageEntry (4 fields exist) — needs an explicit fold-in decision, not a silent drop (Open Question 1).
      • Codex has no equivalent of opencode's findShimIn fail-closed shim check — intentional, since --dangerously-bypass-hook-trust is itself the enablement mechanism (no separate "did the shim load" signal exists to check), but worth calling out since it's a divergence from the pattern being mirrored.
      • isAvailable() enforcing the version floor is new behavior relative to opencode/aider (which leave floor-checking to doctor). AC-10 asks for it explicitly and nothing currently calls .isAvailable() on the execution path, so it's inert today — but a reviewer should see this named as a deliberate deviation, not an inconsistency.

    Feature Quality Planning

    Most standard checks pass. Notable items:

    Derived ACs

    Source Derived AC Priority
    Design Review Q4 AC-11: reasoning_output_tokens is explicitly folded into outputTokens (or otherwise mapped) with a comment stating the choice, not silently dropped Medium
    Feature quality AC-12 (doc-only): PR description notes that run.agent: "codex" requires a manually created .agents/skills symlink until node 2 ships sequant init --agent codex Low

    Open Questions

    1. Does turn.completed.usage.reasoning_output_tokens map onto ModelUsageEntry? Recommendation: fold it into outputTokens (matches how sequant stats/fix(metrics): tokensUsed is 0 on every recorded run — capture-tokens.sh reads .usage (transcripts carry .message.usage) and run reads the wrong dir; wire SDK modelUsage tokens+costUSD per phase × model into metrics and stats #986 treats "output" as billable generation) with a comment explaining the fold, rather than adding a 6th field to an interface every driver shares. Impact if wrong: sequant stats under-reports Codex generation.
    2. Is sandboxMode in CodexSettings actually wired into buildCodexArgs, or reserved for later? Recommendation: wire settings?.sandboxMode ?? "workspace-write" now — the field is already in the AC-named interface, so leaving it unused ships a dead setting. Impact if wrong: a documented config option silently no-ops.
    3. Should the skills-preflight gap (Feature Quality note above) block this issue, or just get flagged? Recommendation: flag only — sequant init --agent codex is an explicit non-goal, and the preflight already fails loudly (not silently) when skills are missing.

    Recommended Workflow

    Phases: spec → testgen → exec → qa
    Quality Loop: disabled
    Reasoning: Every AC names an exact test file and -t filter, and the work mirrors opencode.ts's already-shipped file structure closely enough that testgen can scaffold codex.test.ts's describe/it blocks and the execution-config-parity.test.ts addition before implementation. Overriding the mechanical signal: lintAcceptanceCriteria resolves 9/10 ACs' verificationMethod to manual (they use Verify: prose, not a declared Evidence: clause), which the standard testgen auto-detection table would read as "skip testgen." The underlying work is unit/integration-test-driven throughout, so testgen is recommended by design judgment, documented here per the skill's override requirement. Quality loop stays off: this is a well-specified, single-feature issue with a proven template to mirror (#862), not the ambiguous/iterative shape the loop targets.


    Label Review

    Current: enhancement, planned, multi-agent, backlog
    Recommended: unchanged — but flagging a tension: backlog ("deferred until user traction — 100+ WAU") sits alongside planned on an issue whose probe (#1057) just merged and whose graph position ("1 of 3") reads as actively being worked. Whether backlog should come off now that the probe has concluded and this fullsolve is queued is a strategic call for the user, not something to resolve silently in /spec.
    Reason: No new label is warranted by the plan analysis itself.
    Quality Loop: Won't auto-enable — the mechanical SCOPE_SPLIT_RECOMMENDED verdict was overridden above with reasoning; it doesn't trip the auto-enable heuristic once treated as SCOPE_OK.

    → (no label change recommended; gh issue edit not run)

  3. admarble commented on Sep 15, 2026

    @admarble
    ContributorAuthor

    Test Stubs Generated

    AC Verification Happy Path Failure Paths
    AC-1 Unit Test 4 tests 1 dedupe assumption test
    AC-2 Unit Test 5 tests (args + spawn contract) 1 abort/timeout test
    AC-3 Unit Test 1 test (d) 4 tests: (a)/(b)/(c) + distinct-codes guard
    AC-4 Unit Test — Already scaffolded as it.skip in resume-semantics.test.ts:236-243; no new stub needed, left for /exec to un-skip
    AC-5 Integration Test 7 tests across 2 files —
    AC-6 Unit Test 2 tests —
    AC-7 Integration Test (gated, CODEX_LIVE=1) 3 tests SKIP-when-absent path is itself asserted
    AC-8 Manual / Build Check 1 cheap unit test (devDependencies-only) Manual checklist below for the dist/ grep half
    AC-9 Unit Test 1 scenario + 1 explicit parity test —
    AC-10 Unit Test 3 tests (floor pinned, above/below) 1 test (binary absent)
    AC-11 (derived) Unit Test Folded into AC-1's usage test —
    AC-12 (derived) Doc-only Not a test — PR description item for /exec —

    Counts explained:

    • Happy Path: positive/success stubs
    • Failure Paths: error handling, edge case, negative stubs

    Files written

    • src/lib/workflow/drivers/codex.test.ts (new) — AC-1, AC-2, AC-3, AC-6, AC-8, AC-10, AC-11
    • src/lib/workflow/phase-executor.codex.test.ts (new) — AC-5 (dry-run driver line + codexSettings threading, mirrors phase-executor.opencode.test.ts)
    • src/lib/workflow/drivers/codex.live.integration.test.ts (new) — AC-7, gated on CODEX_LIVE=1, mirrors opencode.live.integration.test.ts
    • src/lib/workflow/drivers/index.test.ts (edited) — AC-5 registry portion (getDriver("codex"))
    • src/lib/workflow/execution-config-parity.test.ts (edited) — AC-9 (added a codex-configured SCENARIOS entry + an explicit codexSettings parity assertion)

    All five files were run against the current (pre-implementation) tree to confirm they fail for the right reason: codex.test.ts, index.test.ts's new cases, and codex.live.integration.test.ts fail on Cannot find module './codex.js' (expected — codex.ts doesn't exist yet); phase-executor.codex.test.ts's 3 new assertions fail because resolveDriverName/getDriver calls don't thread codexSettings yet; the new execution-config-parity.test.ts assertion fails because resolved.codexSettings is undefined. The it.each(SCENARIOS) parity check itself passes trivially today (both producers equally lack the field) and will only fail if the two producers diverge once implemented — exactly the guard it's meant to be.

    Assumptions flagged for /exec to resolve

    These are exported names/shapes the spec implies but doesn't pin, called out inline as ASSUMPTION: comments in codex.test.ts:

    • The modelUsage map's key (model id) — no turn.completed event in the fixture carries a model field; tests assert on values via Object.values(...), not a literal key
    • reasoning_output_tokens folded into outputTokens (3306 + 3200 = 6506) per Open Question 1's recommendation / derived AC-11 — update the assertion together with the required explanatory comment if a different mapping is chosen
    • CODEX_ERROR_CODES member names (turnFailed, streamError, noTerminalTurn) — spec names the three cases, not their code identifiers
    • CodexParsedStream.warnings / .threadId / .commandExecutions field names — spec describes the data, not the field names
    • The mechanism for AC-10's "message naming the floor" — isAvailable() is a bare Promise<boolean> per AgentDriver; recommend mirroring version-check.ts's getNodeVersionError(current, floor) precedent as an exported getCodexVersionError(current: string): string | null, since AC-10 explicitly points at reusing compareVersions from that file

    Manual Test Checklist for AC-8 (dist/ build check)

    Prerequisites

    • codex.ts implemented, @openai/codex-sdk added to devDependencies

    Steps

    1. Action: npm run build
    2. Verify: grep -r "codex-sdk" dist/ | wc -l

    Expected Results

    • Grep count is exactly 0
    • Only import type statements reach codex.ts — no runtime import, even indirect via a re-exported const

    AC-4 note

    resume-semantics.test.ts:236-243 already carries two it.skip blocks reserved for CodexDriver (written when the #497 probe landed). No new stub was generated — /exec should un-skip them once CodexDriver.canResume exists, per the AC's own instruction.


    Next steps:

    1. Resolve the flagged assumptions above while implementing codex.ts (adjust the ASSUMPTION: test bodies to match the real exported shape)
    2. Run /exec 1058 to implement the feature
    3. Verify tests pass with npm test

    Generated with Claude Code

  4. admarble commented on Sep 15, 2026

    @admarble
    ContributorAuthor

    QA Verdict: AC_MET_BUT_NOT_A_PLUS

    AC coverage: 12/13 met

    Gaps:

    • All four AC-3 mutation-verification markers are unparseable by the repo's own §6i gate, so the machine-readable record is empty despite the underlying mutations being genuine and independently reproduced
    • validateCodexSettings is a dead export with no callers and no tests; validation actually flows through CodexSettingsSchema
    • Two getDriver call sites remain settings-blind, the same drift class this PR fixed at the three phase-executor.ts sites; inert today because only resolvesSkills is read
    • --agent codex cannot complete a live phase until node 2 lands; the feat(run): pre-flight the skills install — missing .claude/skills/ should fail fast, not flail for 30 minutes as a spec retry #813 preflight fails closed on the missing .agents/skills tree
    • A user-initiated abort is reported as a timeout across all drivers; pre-existing cross-driver pattern, not introduced here
    • Section reordering dropped the blank line before the 2.15.0 heading; renders correctly but breaks file style
    • validateCodexSettings (src/lib/settings.ts:1133) is a dead export — zero callers, zero tests. Real validation flows through CodexSettingsSchema in RunSettingsSchema. It mirrors the equally-dead validateOpencodeSettings, so it is consistent with the codebase, but validateAiderSettings at least has a test file.
    • CHANGELOG.md:20-21 — the reordering dropped the blank line before ## [2.15.0] - 2026-09-11. Renders correctly in CommonMark; style nit only.

    Suggestions:

    • CodexParsedStream.parseFailures is tracked but never surfaced — a codex build that prints a non-JSON banner to stdout would silently lose that content from output with no signal. stdoutTail still captures it, so this is observability, not correctness.
  5. admarble commented on Sep 15, 2026

    @admarble
    ContributorAuthor

    QA second look (owner session) — 2 defects fixed, verdict upgraded to READY_FOR_MERGE at 9eb18cc8

    Reviewed PR #1062 with the real codex 0.154.0 binary and a CODEX_API_KEY — the two things the phase agents did not have. Both found something the first pass could not.

    Defects (fixed in 9eb18cc8):

    • AC-1/AC-11 — reasoning tokens double-counted. toModelUsage added reasoning_output_tokens to output_tokens, but the former is a breakdown of the latter: across all six probe runs output − reasoning equals the visible text (3306 − 3200 = 106 for 165 chars; PONG = 6/0). sequant stats would have reported ~2× output for codex. Now output_tokens as-is.
    • AC-7 — the live test could never pass. Bare mkdtemp cwd → codex exec exits 1 (Not inside a trusted directory), zero events; the PR's one unchecked box hid it. Test now git inits its temp dir; the synthetic "real stream" test is replaced by re-parsing the live run's captured stream. 2 passed against the real binary.
    • §6i mutation record was empty (QA's finding confirmed with parseMutationMarkers: all four test_not_in_diff). failedTest now carries the codex.test.ts > prefix; all four valid.

    Confirmed, no change needed: subprocess-not-SDK, stdin: "ignore", detached group kill, ErrorItem-as-warning, resume drops -C; AC-5 dry-run prints Driver: codex ×3; AC-8 dist/ grep → 0; 88 codex tests + 40 after the fix.

    Not PR defects: the branch's 2 doctor failures were v2.15.0-vs-2.15.1 version drift (gone after merging main — same class as #1056, worth a follow-up since it recurs every release); the PR body's "3 pre-existing failures" trio and the current version-preflight.docs/tui/load pair are ~5 s load timeouts that pass targeted — rotating set, not a regression.

    Carried as known, per the PR's design notes: modelUsage keyed codex-default when unpinned; exit 0 with no turn.completed counts as success; abort reports as timeout (cross-driver). None block node 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogenhancementmulti-agentplanned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions