fix(server): Codex plans offer Implement again - #13793
Conversation
The Codex adapter marked a finished proposed plan "completed". Clients only offer Implement (and the sidebar only shows Plan Ready) for an "active" plan, and the server rejects Implement for a plan that is not active, so a Codex plan could never be implemented. Claude and Cursor already publish finished proposals as active; Codex now does too, and Implement still completes the plan when it consumes it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This narrowly scoped Codex lifecycle fix keeps a finished proposed plan actionable until Implement consumes it, while execution nodes and turn items still complete normally. The accompanying fixture assertion covers the behavior, with no schema, infrastructure, default, or static-analysis changes. You can add or adjust custom eligibility rules. Learn more. |
0481b76
into
t3code/codex-turn-mapping
A Codex plan-mode turn that proposes a plan never offers Implement, and the sidebar never shows "Plan Ready". The composer only has the plain send arrow, and the plan cannot be implemented from the UI.
Seen live on Codex 0.156.1 / gpt-6-luna in Plan mode. After the turn settled,
orchestration_v2_projection_plansheld the proposed plan with"status":"completed":Why
The Codex adapter published the finished
planitem withstatus: "completed". Everything downstream treats onlyactiveas an open proposal:hasActionableProposedPlan(the Implement button) and the sidebar's "Plan Ready" pill,hasActionableProposedPlan,message.dispatch, which rejectssourcePlanReffor a plan that isnot active.completedis the state Implement moves a plan into once it consumes it. Claude (status: "active") and Cursor (completed ? "active" : "draft") already publish finished proposals as active. The streaming deltas in the Codex adapter were alreadyactive, so the plan flipped tocompletedonly when the item finished.Fix
The Codex adapter publishes a finished proposed plan as
active. Implement still marks itcompletedwhen it runs.This is separate from #13775, which fixes the server-side
sourcePlanReflookup for every provider. Codex plans also need this change before the Implement button appears, and before #13775's path can accept them.Verification
proposed_planCodex replay fixture (recorded on 0.156.1) now asserts that the final proposed plan isactive. It fails on the base (expected 'completed' to equal 'active') and passes with the fix.vp test run src/orchestration-v2/testkit/OrchestratorReplayFixtures.integration.test.ts -t "proposed_plan|plan_questions": 5 passed.vp test run src/orchestration-v2/Adapters/CodexAdapterV2.test.ts -t "plan|Plan": 2 passed.vp exec tsc --noEmit -p .inapps/server: clean.vp lint/vp fmton the touched files show only the twono-unused-varswarnings that already exist inCodexAdapterV2.ts.Model: Claude Opus 5.5 (Claude Code)
🤖 Generated with Claude Code