Codex MCP tool responses omit conversation metadata, blocking codex-reply

Resolved 💬 3 comments Opened Oct 25, 2025 by HumanSulfate Closed Mar 20, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

OpenAI Codex (v0.49.0)

What subscription do you have?

Plus

Which model were you using?

gpt-5-codex

What platform is your computer?

Linux 6.17.4-200.fc42.x86_64 x86_64

What issue are you seeing?

Codex MCP tool responses omit conversation metadata, blocking codex-reply

What steps can reproduce the bug?

  1. Launch codex mcp-server and connect via an MCP client (e.g., Inspector).
  2. Call the codex tool with any prompt.
  3. Inspect the tools/call response: it only includes the assistant text (“Hey You! …”) and structured_content: null; no conversationId is returned, so you can’t call codex-reply.

What is the expected behavior?

tools/call responses should include structured metadata (at least conversationId, ideally model/rollout info) so clients can resume the session via codex-reply, matching the docs (docs/advanced.md and codex_r*s/docs/codex_mcp_interface.md).

Additional information

In codex-rs/mcp-server/src/codex_tool_runner.rs, capture the conversation_id and SessionConfiguredEvent when starting a new conversation, wrap them in a helper (e.g., ConversationContextSnapshot), and pass that snapshot through run_codex_tool_session_inner. When handling EventMsg::TaskComplete, set CallToolResult.structured_content = snapshot.structured_content() so the response contains { "conversationId": "...", "model": "...", … }. Unit tests covering the serializer are included in the attached patch.

conversation_id.patch

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 10 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #4651
  • #3712

Powered by Codex Action

aavetis · 7 months ago

bump

etraut-openai contributor · 5 months ago

We are not planning to make further investments in the Codex MCP server.