Multi-agent subagent notifications leak into the main chat as raw JSON assistant messages

Open 💬 4 comments Opened Apr 12, 2026 by ozan-s

What version of Codex CLI is running?

codex-cli 0.120.0

What subscription do you have?

Pro

Which model were you using?

gpt-5.4

What platform is your computer?

Darwin 24.6.0 arm64 arm

What terminal emulator and version are you using (if applicable)?

Ghostty

What issue are you seeing?

Subagent completion/mailbox traffic is leaking into the main chat transcript as raw JSON assistant messages. This message leak also causes agent turn to end and wait for user input.

Example of what shows up in the main chat:

{"author":"/root/task1_spec_review_rerun","recipient":"/root","other_recipients":[],"content":<subagent_notification>\n{\"agent_path\":\"/root/task1_spec_review_rerun\",\"status\":{\"completed\":\"SPEC_PASS ...\"}}\n</subagent_notification>","trigger_turn":false}

What steps can reproduce the bug?

This appears when using subagents, but not always. Latest release made it much more frequent.

Here is a session where this behaviour appeared multiple times:
thread ID 019d8094-a19c-7372-8e3c-a61a44ad4571

What is the expected behavior?

Multi-agent workflows should continue to work, but internal subagent notifications / mailbox messages should not be rendered into the main user-facing chat as raw JSON.

Additional information

This looks like a regression.

There appear to be two relevant changes:

  1. 773fbf56a4 on 2026-03-24, feat: communication pattern v2 (#15647)
  • This appears to be the bug-enabling change.
  • Subagent completion notices that were previously hidden user-fragment notifications started being sent on the MultiAgentV2 path as InterAgentCommunication assistant envelopes.
  1. e4f1b3a65 on 2026-04-03, Preempt mailbox mail after reasoning/commentary items (#16725)
  • This appears to be the recent change that made the problem much more visible/frequent.
  • It preempts for pending mailbox mail after reasoning/commentary items, which seems to surface these assistant envelopes much more often.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗