Skip to content

Support plaintext agent messages - #27830

Merged
dylan-hurd-oai merged 8 commits into
mainfrom
jif/plaintext-agent-messages
Jun 12, 2026
Merged

Support plaintext agent messages#27830
dylan-hurd-oai merged 8 commits into
mainfrom
jif/plaintext-agent-messages

Conversation

@jif-oai

@jif-oai jif-oai commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Why

Multi-agent v2 send_message deliveries already reach the receiving model as typed agent_message items with encrypted content. Child-completion notifications are generated by Codex itself, so their content is plaintext and previously fell back to a serialized JSON envelope inside an assistant message.

With plaintext input_text supported for agent_message, both delivery paths can use the same model-visible type while preserving explicit author and recipient metadata.

What changed

  • add plaintext input_text support to AgentMessageInputContent and regenerate the affected app-server schemas
  • preserve InterAgentCommunication as structured mailbox input instead of converting it to assistant text
  • record delivered communications as typed agent_message history items
  • persist a dedicated rollout item so local delivery metadata such as trigger_turn remains available without leaking into the Responses request
  • reconstruct typed agent messages on resume and preserve fork-turn truncation behavior
  • remove request-time assistant-content parsing
  • preserve plaintext and encrypted inter-agent deliveries in stage-one memory inputs
  • normalize and link plaintext and encrypted agent messages in rollout traces without treating inbound messages as child results
  • cover the real MultiAgent V2 child-completion path end to end with deterministic mailbox synchronization

Verification

  • just test -p codex-core plaintext_multi_agent_v2_completion_sends_agent_message
  • just test -p codex-core input_queue_drains_mailbox_in_delivery_order record_initial_history_reconstructs_typed_inter_agent_message fork_turn_positions_use_inter_agent_delivery_metadata
  • just test -p codex-memories-write serializes_inter_agent_communications_for_memory
  • just test -p codex-rollout-trace agent_messages_preserve_routing_and_content sub_agent_started_activity_creates_spawn_edge
  • just test -p codex-rollout-trace agent_result_edge_falls_back_to_child_thread_without_result_message
  • just test -p codex-protocol -p codex-rollout -p codex-app-server-protocol

@jif-oai
jif-oai marked this pull request as ready for review June 12, 2026 09:40
@jif-oai
jif-oai requested a review from a team as a code owner June 12, 2026 09:40
@jif-oai

jif-oai commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@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: 175e330c02

ℹ️ 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/session/input_queue.rs Outdated
Comment thread codex-rs/core/src/session/input_queue.rs Outdated
Comment thread codex-rs/protocol/src/protocol.rs
@jif-oai

jif-oai commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@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: dea1baa7a9

ℹ️ 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/protocol/src/protocol.rs
Comment thread codex-rs/core/tests/suite/subagent_notifications.rs Outdated
@jif-oai jif-oai changed the title [codex] Support plaintext agent messages Support plaintext agent messages Jun 12, 2026
@jif-oai

jif-oai commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@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: e62505d9da

ℹ️ 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/client_common.rs Outdated
Comment thread codex-rs/rollout/src/search.rs
@jif-oai

jif-oai commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@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: 3d56c1105d

ℹ️ 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/client_common.rs
Comment thread codex-rs/protocol/src/protocol.rs
Comment thread codex-rs/rollout/src/search.rs
@dylan-hurd-oai
dylan-hurd-oai merged commit 8f2d641 into main Jun 12, 2026
31 checks passed
@dylan-hurd-oai
dylan-hurd-oai deleted the jif/plaintext-agent-messages branch June 12, 2026 20:50
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 12, 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.

2 participants