-
Notifications
You must be signed in to change notification settings - Fork 10.2k
MCP Server: codex-reply tool missing conversationId in response #8580
Copy link
Copy link
Closed
Labels
CLIIssues related to the Codex CLIIssues related to the Codex CLIenhancementNew feature or requestNew feature or requestmcpIssues related to the use of model context protocol (MCP) serversIssues related to the use of model context protocol (MCP) serversmcp-serverIssues related to the use of the `codex mcp-server` subcommandIssues related to the use of the `codex mcp-server` subcommand
Description
Summary
When using codex mcp-server as an MCP server (e.g., integrated with Claude Code), the codex tool does not return the conversationId in its response, making it impossible to use codex-reply for continuous conversations without manually retrieving the session ID from the filesystem.
Current Behavior
- Call
codexMCP tool → Get result text only codex-replyrequiresconversationId(UUID format)- The session ID is only available by parsing filenames in
~/.codex/sessions/YYYY/MM/DD/rollout-{timestamp}-{SESSION_ID}.jsonl
Expected Behavior
The codex MCP tool response should include the conversationId so that subsequent codex-reply calls can be made seamlessly:
{
"result": "...",
"conversationId": "019b63ce-02a4-7223-8d1d-f5dc6a1b4877"
}Reproduction Steps
- Configure
codex mcp-serverin an MCP client (e.g.,.mcp.json) - Call the
codextool with a prompt - Attempt to call
codex-reply- fails because noconversationIdwas provided in the initial response - Workaround: Manually extract UUID from
~/.codex/sessions/directory
Workaround
# Get the latest session ID from filesystem
ls -t ~/.codex/sessions/$(date +%Y)/$(date +%m)/$(date +%d)/*.jsonl | head -1 | \
grep -oE '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'Environment
- Codex CLI version: latest
- MCP integration: Claude Code
- OS: macOS
Impact
This limitation prevents seamless multi-turn conversations when using Codex as an MCP server, which is a key use case for AI-to-AI collaboration workflows.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
CLIIssues related to the Codex CLIIssues related to the Codex CLIenhancementNew feature or requestNew feature or requestmcpIssues related to the use of model context protocol (MCP) serversIssues related to the use of model context protocol (MCP) serversmcp-serverIssues related to the use of the `codex mcp-server` subcommandIssues related to the use of the `codex mcp-server` subcommand