test(server): record Codex multi-agent V2 subagents live on 0.156.1 - #13508
Merged
juliusmarminge merged 3 commits intoSep 24, 2026
Merged
Conversation
The Codex thread_rollback transcript was captured on 0.120 and its rollback exchange was hand-edited to the 0.156 thread/turns/list + thread/revert shape. Re-record it against a real 0.156.1 app-server so the revert path is proven by Codex itself. The recorder now sends the adapter's initialize opt-out and turn/start defaults, reads the thread's history mode before reverting (as the adapter does), accepts --model, and writes the recording cwd as <workspace>, so the transcript replays without edits. The fixture's Codex variant uses gpt-5.6-luna because the hub no longer serves gpt-5.4. The live recording shows a paginated thread from thread/start, a revert response with empty turns plus backwards cursors, and a post-revert recall that only contains the first turn. The output assertion now checks that recall, and the extra reasoning items the current model emits. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The subagent_v2 and subagent_v2_nested transcripts were hand-built with synthetic thread ids and hand-ordered frames. Record both against a real Codex 0.156.1 app-server on gpt-5.6-sol, which runs multi-agent v2. The recorder gains the two scenarios and a per-run thread/start config override: the nested scenario raises agents.max_depth to 3, since Codex only lets root spawn by default. Replay ignores thread/start config, so the transcript still matches the adapter's frames. The prompts now ask for the spawns explicitly; "just say hello" alone no longer spawns anything on this model. In both recordings Codex emits the child's idle status, then the parent's subAgentActivity(started), then the child's turn/started, so the adapter registers the child before its first turn. Assertions now name the agent paths and answers the model chose, and the scenario expectations use the recorder's method labels. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
ApprovabilityA prior Macroscope approval was dismissed. Re-evaluating e79ede0… |
Contributor
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. |
Base automatically changed from
v2/codex-rollback-live
to
t3code/codex-turn-mapping
September 24, 2026 22:19
macroscopeapp
Bot
dismissed
their stale review
September 24, 2026 22:19
Dismissing prior approval to re-evaluate a955a2c
…turn The live multi-agent V2 recordings show the parent's subAgentActivity(started) arriving before each child's turn/started, and the adapter registers children from that activity. Check the ordering in both transcripts, so a re-recording that reverses it fails loudly. Also drop `_LIVE_` from the V2 prompt names. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
macroscopeapp
Bot
dismissed
their stale review
September 24, 2026 22:26
Dismissing prior approval to re-evaluate e79ede0
juliusmarminge
added a commit
that referenced
this pull request
Sep 24, 2026
…13508) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
juliusmarminge
added a commit
that referenced
this pull request
Sep 25, 2026
…13508) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
subagent_v2andsubagent_v2_nestedCodex transcripts were hand-built, with synthetic thread ids and hand-ordered frames. This records both live against Codex 0.156.1 ongpt-5.6-sol, which runs multi-agent v2.Stacked on #13505, which adds the recorder changes this uses: the adapter's
turn/startdefaults,--model, and<workspace>.What changed
subagent_v2andsubagent_v2_nestedscenarios;thread/startconfigoverride. The nested scenario setsagents.max_depth: 3, because by default Codex only lets the root agent spawn. Replay ignoresthread/startconfig, so the transcript still matches the adapter's frames.gpt-5.6-sol, "just say hello" answers directly and spawns nothing.modelSelection(gpt-5.6-sol). The shared selection is unchanged./root/hello;/root/relay_one/relay_two/hello_child). TheCodexReplayFixturesexpectations use the recorder's method labels instead of the hand-written role labels.What the live recordings showed
In both recordings, and at every nesting level, Codex emits:
thread/status/changed(idle),subAgentActivity(started),thread/status/changed(active) andturn/started.So the adapter registers the child before its first turn. This matches the 0.145 capture in
codexMultiAgentWire.json. The "child turn starts before the parent's activity" race did not happen, so this PR contains no adapter change.Children finish first. Each parent then emits
subAgentActivity(completed), awaitcollabAgentToolCall, and its own answer. The adapter projects all four nested threads with the right lineage and results.Verification
vp test run src/orchestration-v2/testkit/OrchestratorReplayFixtures.integration.test.ts -t "subagent_v2|thread_rollback": 4 passed.vp test runonCodexReplayFixtures,OrchestratorReplayFixtures.contract,CodexAdapterV2.test.ts,ThreadFork,ThreadMergeBackandscripts/codexReplayRecordingRecords.test.ts: 139 passed.vp exec tsc --noEmit -p .inapps/server: no errors or warnings.vp run knip:checkpasses.vp linton the touched files reports only an unusedassertUserMessagesExcludeinfixtures/shared.ts, which is already on the base branch.T3_CODEX_BIN=<codex 0.156.1> node scripts/record-codex-app-server-replay-fixture.ts --scenario subagent_v2 --model gpt-5.6-sol, and the same with--scenario subagent_v2_nested.plan_questions/codexfails on the base branch too. Its 0.120 transcript has noisBlockingonitem/tool/requestUserInput, so the 0.156 decode rejects the request. Replay then stalls for 60 seconds instead of reporting the error.Model: Claude Opus 5.5 (Claude Code)
🤖 Generated with Claude Code