Skip to content

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

Closed as not planned

Description

@HumanSulfate

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

Activity

  1. added
    bug
    on Oct 25, 2025
  2. added
    mcp
    on Oct 25, 2025
  3. github-actions commented on Oct 25, 2025

    @github-actions
    Contributor

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

    Powered by Codex Action

  4. added
    enhancement
    and removed
    bug
    on Dec 15, 2025
  5. aavetis commented on Jan 5, 2026

    @aavetis

    bump

  6. added
    mcp-server
    and removed
    mcp
    on Mar 20, 2026
  7. etraut-openai commented on Mar 20, 2026

    @etraut-openai
    Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementmcp-server

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions