Missing conversationId of Codex MCP Server

Resolved 💬 11 comments Opened Sep 16, 2025 by MaurUppi Closed Jan 14, 2026
💡 Likely answer: A maintainer (bolinfest, collaborator) responded on this thread — see the highlighted reply below.

https://github.com/openai/codex/releases/tag/rust-v0.36.0

initial MCP interface and docs (https://github.com/openai/codex/pull/3543, https://github.com/openai/codex/pull/3507, https://github.com/openai/codex/pull/3345)
codex Run a Codex session. Accepts configuration parameters matching the Codex Config struct. codex-reply Continue a Codex conversation by providing the conversation id and prompt.

https://github.com/openai/codex/blob/a8026d3846486e790827b26e9abf13e7f96e48bf/docs/advanced.md?plain=1#L106

WHEN the MCP tool codex returns without a conversationId, HOW to use the tool codex-reply?

@charlie-openai

BTW, is Session ID equivalent to conversationId?

<img width="964" height="560" alt="Image" src="https://github.com/user-attachments/assets/a8307281-eb34-4ab5-94d0-115a455c8e15" />

View original on GitHub ↗

11 Comments

orakemu · 9 months ago

I set up the codex mcp with claude code. It is detected and works but doesn't return anything

codex version: 0.46

MCP config in claude.json:

"codex": {
    "type": "stdio",
    "command": "codex",
    "args": [
      "mcp"
    ],
    "env": {}
  }

Claude Code output:

Interesting! I can see that Python files were actually created (hello_from_codex.py,), which suggests that previous Codex MCP call did work - they just didn't return visible output! Let me check one of these files:
  ⎿  Read 2 lines

● Excellent! The Codex MCP server is actually working! It successfully created the Python script as requested. The issue is just that the MCP tool doesn't return visible conversation output - it executes the task silently in the background.

  So to summarize:
  - ✅ Codex MCP server is properly configured and functional
  - ✅ It successfully executes tasks (as evidenced by the created files)
  - ❌ The conversation output isn't displayed through the MCP tool interface

The Codex MCP integration works, but operates more like a "fire and forget" system where you send a task and it completes it without returning anything.
zdoek001 · 8 months ago

Also, the conversationId is missing. Is there no solution for this?

Manouchehri · 8 months ago

Yeah, same problem here; because of this, the codex MCP makes it impossible to resume a convo in any MCP client that I'm aware out.

ClaytonSmith · 8 months ago

+1 on this

For now I plan of foraging for the conversationId (aka session_id?) in the ~/.codex/history.jsonl. There's also some additional goodness in the sessions/YYYY/MM/DD files. If the session_id is actually the conversationId, then I might still scrape it from the session logs even after a fix because the session logs also includes the token_count payload and rate limit stats.

ClaytonSmith · 8 months ago

Bad news.... The session_id is not the conversation_id. In the standard operating mode, you can run codex resume <session_id> which made me think the conversationId was an alias, but alas, it is not :(

ClaytonSmith · 8 months ago

Or maybe it is but the internal plumbing just isn't connected to allow the mcp-server to pickup a conversation.

fitzjalen · 8 months ago

+1 - critical issue for me

klarkc · 7 months ago

Can't use codex as MCP server right now due to this issue. Big blocker for me.

konarkm · 7 months ago

Are there any open PRs fixing this?

aavetis · 6 months ago

bump -

am i missing something? i see conversation IDs, but the problem seems like you can't continue them. this doc says there is listConversations and resumeConversation, but they don't seem to work when the mcp server restarts.

called codex-reply via MCP with the conversation id
  019b8c02-92aa-7ac1-acc3-ec39a218a3d4.

  Result (from the MCP server):

  Session not found for conversation_id: 019b8c02-92aa-7ac1-acc3-
  ec39a218a3d4