Skip to content

Consolidate multi-agent v2 communication sends#30867

Merged
bolinfest merged 1 commit into
mainfrom
pr30867
Jul 2, 2026
Merged

Consolidate multi-agent v2 communication sends#30867
bolinfest merged 1 commit into
mainfrom
pr30867

Conversation

@bolinfest

@bolinfest bolinfest commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Why

Multi-agent v2 communications currently use separate outbound paths: direct messages, follow-up tasks, and completion results go through send_inter_agent_communication, while a spawn's initial message goes through the generic input submission path. That split makes it difficult to add complete communication lifecycle logging in one place.

This refactor makes submit_inter_agent_communication the common sink for those paths, preparing the follow-up observability work discussed in #30516.

What changed

  • Routed all current outbound InterAgentCommunication paths in AgentControl—direct messages, follow-up tasks, completion results, and multi-agent v2 spawn initial messages—through submit_inter_agent_communication.
  • Centralized the actual submission and last-task-message bookkeeping there, providing one place for the follow-up PR to instrument communication creation and successful enqueue.
  • Left non-communication input handling and the multi-agent v1 spawn flow unchanged.

Testing

  • just test -p codex-core 'agent::control::tests::' (51 passed)
  • just test -p codex-core 'suite::subagent_notifications::encrypted_multi_agent_v2_spawn_sends_agent_message_to_child' (passed)

Stack created with Sapling. Best reviewed with ReviewStack.

@bolinfest bolinfest requested a review from a team as a code owner July 1, 2026 20:53
@bolinfest bolinfest force-pushed the pr30867 branch 3 times, most recently from 4862e62 to 88aee5b Compare July 1, 2026 21:17
@bolinfest bolinfest merged commit a98a217 into main Jul 2, 2026
50 of 69 checks passed
@bolinfest bolinfest deleted the pr30867 branch July 2, 2026 00:08
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants