multi-agent: add path-based v2 activity tracking - #27007
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6bba7d7f04
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Are we at a greater risk of contention with agent names now? We currently refer to subagents via their uuid, but uniqueness of subagent path is now on the model to ensure. |
fcoury-oai
left a comment
There was a problem hiding this comment.
Smoke tested the new behavior and it worked as expected. Codex found 3 issues that seem real, please take a look and check if they are worth addressing.
Approved.
@btraut-openai no this is already covered in core |
Why
Multi-agent v2 identifies agents by canonical paths, but its tool handlers still emitted the larger legacy collaboration begin/end events built around nickname and role metadata. App-server, rollout-trace, analytics, and TUI consumers therefore lacked one compact path-based completion signal that behaved consistently across live events and replay.
The TUI also needs a bounded
/agentstatus surface for v2 agents. It should use recent local activity for previews, refresh liveness without loading full histories, and keep the legacy picker available when no path-backed v2 agent is known.What changed
spawn_agent,send_message,followup_task, andinterrupt_agentlegacy lifecycle emissions with a success-onlySubAgentActivityevent. The event records the tool call ID, occurrence time, affected thread, canonical agent path, andstarted,interacted, orinterruptedkind.subAgentActivitythread item in live notifications and reconstructed history, regenerate the protocol schemas, and count it in sub-agent tool analytics./agentlist running path-backed agents with summaries from bounded local event buffers. Each summary is capped at 240 graphemes, the scan is capped at six recent items, only the last three wrapped lines are shown, and command output is omitted. Liveness falls back to metadata-onlythread/readwhen local turn state is unavailable.interrupt_agentis classified as a close-edge operation.Compatibility
App-server v2 clients that consumed
collabAgentToolCallbegin/end pairs for these tools must handle the new completion-onlysubAgentActivityitem. Legacy v1 collaboration behavior is unchanged.Screenshot
Testing
just test -p codex-app-server-protocoljust test -p codex-rollout-traceinterrupt_agentclassification, TUI status rendering without aggregated command output, and clearing stale running state after a completed turn.