Repository navigation
Name the spawning call on a Codex subagent's start - #1939
Conversation
An import posts every start after the parent transcript, so the server can place a subagent's row only by the call; a grandchild names its root-level ancestor's call, since it is imported onto the root Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR Summary by QodoPlace Codex subagents at their spawning calls
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
Code Review by Qodo
1.
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Part of AI-3070 (no GitHub issue)
What & why
A Codex import posts every subagent's start after the whole parent transcript, so the server puts every Codex agent row under the last turn. The start now carries
spawn_call_id: the parent'sspawn_agentcall whose output names the agent'sagent_pathas itstask_name. A grandchild is imported onto the root, so it names its nearest root-level ancestor's call. The live watcher sends the same field, read once per scan that finds a new childThe server half, which stores the call on the start and places the row by it, is kurrent-io/kcap-server#2673. A server without it ignores the field
Where to look
ReadSpawnCallsreads the whole parent rollout once per import. A spawn whose output is not written yet names no call, and the start keeps its own positionVerification
An_imported_subagent_start_names_the_call_that_spawned_it_or_its_ancestordrivesSessionImporter.ImportSessionAsyncover a rollout tree with a child, a grandchild, an agent whose path only another tool's output carries, and a truncated last line. Red when the importer sends no call, and when a non-spawn output is accepted:Expected to be equivalent to [[019fec44…, call_spawn], …]A_path_takes_its_own_spawning_call_or_its_nearest_ancestorsis red on/root/a/b/cwhen the walk stops at the exact pathtask_nameoutputs match real Codex 0.146 rollouts🤖 Generated with Claude Code
Summary by CodeRabbit