Currently, the codex ACP doesn't send the messageId field in any of the "user_message_chunk", "agent_message_chunk", or "agent_thought_chunk" updates from session/update.
As outlined in the draft RFC, this makes it difficult to implement certain features like separating messages in the UI.
If you don't want to commit to the api outlined in the RFC, you could also return them in the _meta attribute map.
Similar issue in the claude agent ACP: zed-industries/claude-agent-acp#407