Make MultiAgentV2 interruption markers assistant-authored#19124
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1ef64b8bfc
ℹ️ 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review |
Why
MultiAgentV2follow-up messages are delivered to agents as assistant-authoredInterAgentCommunicationenvelopes. Whenfollowup_taskusedinterrupt: true, the interrupted-turn guidance was still persisted as a contextual user message, so model-visible history made a system-generated interruption boundary look user-authored.This keeps interruption guidance consistent with the rest of the v2 inter-agent message stream while preserving the legacy marker shape for non-v2 sessions.
What changed
interrupted_turn_history_markerfeature-aware.OutputTextmessage whenFeature::MultiAgentV2is enabled.followup_taskinterrupt path and the helper-level v2 marker shape.Testing
cargo test -p codex-core multi_agent_v2_followup_task_interrupts_busy_child_without_losing_message -- --nocapturecargo test -p codex-core multi_agent_v2_interrupted_marker_uses_assistant_output_message -- --nocapturecargo test -p codex-core interrupted_fork_snapshot -- --nocapture