Getting responses in JSON
Resolved 💬 3 comments Opened Apr 13, 2026 by budivoogt Closed Apr 13, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
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 25.1.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
Ghostty in Cmux
What issue are you seeing?
Model responds to me in JSON, as if it forgot to sanitize the response.
What steps can reproduce the bug?
Uploaded thread: 019d8528-7284-7531-a593-bc77b03938f2
What is the expected behavior?
_No response_
Additional information
_No response_
3 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
@jif-oai, here's some details provided by codex:
Thanks for the bug report. I inspected the uploaded parent rollout plus the related subagent rollouts. This looks like a MultiAgentV2/inter-agent notification leak rather than a user instruction or JSON-mode issue.
The parent thread spawned multiple subagents. The subagents’ own rollouts completed normally with regular prose final answers. However, the parent rollout later recorded assistant-role messages whose text was a serialized inter-agent envelope with fields like:
authorrecipientother_recipientscontenttrigger_turnThe
contentfield wrapped a<subagent_notification>payload containing the subagent completion. One of these serialized envelopes then became the parent thread’s visiblefinal_answer.Concretely, the failure pattern is:
I did not see evidence that this was caused by
final_output_json_schema,response_format, or user/developer instructions asking the model to emit JSON. The JSON shape matches the inter-agent communication envelope, not arbitrary model output.This appears to be in the same family as the earlier reports about raw subagent notifications leaking into chat. The likely handoff area is the MultiAgentV2/inter-agent mailbox path: internal
InterAgentCommunication/ subagent notification payloads are reaching assistant-visible or user-visible transcript paths, where they can be rendered directly or contaminate the next model turn.Multi-agent v2 is not meant to be used right now. Models are not trained yet to use it
Are you enabling the feature @budivoogt ? Can you
/feedbackand give me the session ID please?