Summary
Codex subagent sessions do not show the user message sent by the parent agent in the child chat stream.
Problem
ACP UserMessageChunk updates are currently recognized for metadata merging, but they are not handled in session_notification, so they fall through and are discarded. As a result, the child session can show the subagent response without first showing the parent-sent prompt/request that triggered it.
Expected behavior
When a parent agent sends a message to a child/subagent session, that message should appear in the child transcript as a user-side message before the child agent response streams.
Expected fix direction
Add first-class handling for runtime-originated user message chunks instead of routing them through the assistant-only message stream. The event/store contract should preserve message role/kind, or introduce a dedicated user-message transcript event, so UserMessageChunk can append/stream a role: "user" text message in the target child session without corrupting assistant streaming state.
Relevant code
apps/desktop/native-backend/src/ai.rs: session_notification handles AgentMessageChunk but not UserMessageChunk.
crates/ai/src/events.rs: message stream payloads currently do not carry role/kind.
apps/desktop/src/features/ai/store/chatStore.ts: message deltas currently materialize as assistant text messages.
Summary
Codex subagent sessions do not show the user message sent by the parent agent in the child chat stream.
Problem
ACP
UserMessageChunkupdates are currently recognized for metadata merging, but they are not handled insession_notification, so they fall through and are discarded. As a result, the child session can show the subagent response without first showing the parent-sent prompt/request that triggered it.Expected behavior
When a parent agent sends a message to a child/subagent session, that message should appear in the child transcript as a user-side message before the child agent response streams.
Expected fix direction
Add first-class handling for runtime-originated user message chunks instead of routing them through the assistant-only message stream. The event/store contract should preserve message role/kind, or introduce a dedicated user-message transcript event, so
UserMessageChunkcan append/stream arole: "user"text message in the target child session without corrupting assistant streaming state.Relevant code
apps/desktop/native-backend/src/ai.rs:session_notificationhandlesAgentMessageChunkbut notUserMessageChunk.crates/ai/src/events.rs: message stream payloads currently do not carry role/kind.apps/desktop/src/features/ai/store/chatStore.ts: message deltas currently materialize as assistant text messages.