Skip to content

Make MultiAgentV2 interruption markers assistant-authored#19124

Merged
jif-oai merged 3 commits into
mainfrom
jif/interrupt-message-as-assistant
Apr 24, 2026
Merged

Make MultiAgentV2 interruption markers assistant-authored#19124
jif-oai merged 3 commits into
mainfrom
jif/interrupt-message-as-assistant

Conversation

@jif-oai

@jif-oai jif-oai commented Apr 23, 2026

Copy link
Copy Markdown
Collaborator

Why

MultiAgentV2 follow-up messages are delivered to agents as assistant-authored InterAgentCommunication envelopes. When followup_task used interrupt: 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

  • Make interrupted_turn_history_marker feature-aware.
  • Record the interrupted-turn marker as an assistant OutputText message when Feature::MultiAgentV2 is enabled.
  • Keep the existing user contextual fragment for non-v2 sessions.
  • Apply the same feature-aware marker to interrupted fork snapshots.
  • Add coverage for the live followup_task interrupt 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 -- --nocapture
  • cargo test -p codex-core multi_agent_v2_interrupted_marker_uses_assistant_output_message -- --nocapture
  • cargo test -p codex-core interrupted_fork_snapshot -- --nocapture

@jif-oai jif-oai requested a review from a team as a code owner April 23, 2026 10:11
@jif-oai

jif-oai commented Apr 23, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@jif-oai jif-oai changed the title chore: make interrupt message as assistant message for multi-agent v2 Make MultiAgentV2 interruption markers assistant-authored Apr 23, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread codex-rs/core/src/tasks/mod.rs Outdated
@jif-oai

jif-oai commented Apr 23, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Hooray!

ℹ️ 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".

@jif-oai

jif-oai commented Apr 23, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@jif-oai jif-oai merged commit 120aa07 into main Apr 24, 2026
35 of 36 checks passed
@jif-oai jif-oai deleted the jif/interrupt-message-as-assistant branch April 24, 2026 11:39
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant