Skip to content

Sync subagent multi-agent mode with root#28970

Closed
shijie-oai wants to merge 2 commits into
shijie/ma-v2-mode-lifecyclefrom
shijie/sync-ma-hint
Closed

Sync subagent multi-agent mode with root#28970
shijie-oai wants to merge 2 commits into
shijie/ma-v2-mode-lifecyclefrom
shijie/sync-ma-hint

Conversation

@shijie-oai

Copy link
Copy Markdown
Collaborator

Summary

  • Resolve the root thread's selected multi-agent mode whenever a thread-spawn subagent builds a new turn
  • Keep per-agent effective-mode calculation based on the subagent's own model, feature state, and source
  • Preserve the subagent's persisted selection as a fallback when the root thread is unavailable

Why

Previously, subagents copied the parent mode when they were spawned and restored their own last effective mode after residency eviction. Changing the root mode could therefore leave loaded and revived subagents operating under different delegation hints.

This change keeps the root thread authoritative for subsequent turns without coupling prompting policy to V2 residency.

Validation

  • just test -p codex-core multi_agent_mode
  • just fix -p codex-core
  • just fmt

Stacked on #28792.

@shijie-oai shijie-oai force-pushed the shijie/ma-v2-mode-lifecycle branch from 4fe4b98 to d035949 Compare June 18, 2026 23:46
@shijie-oai

Copy link
Copy Markdown
Collaborator Author

Superseded by #28792. The retained behavior is the narrower spawn-time inheritance: V2 passes the invoking turn's effective multi-agent mode into the new child, and the child keeps that mode after spawn. The per-message mailbox synchronization from this draft was intentionally dropped.

@shijie-oai shijie-oai closed this Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant