Expose callId in MCP tool call _meta for all servers

Open 💬 3 comments Opened May 4, 2026 by daniloag

What variant of Codex are you using?

CLI

What feature would you like to see?

Context

When Codex dispatches an MCP tool call, the tool call's call_id is passed to build_mcp_tool_call_request_meta, but only included in _meta for the codex_apps server, nested under _codex_apps.call_id. Custom MCP servers receive no identifier for the originating tool call.

Ask

Add callId at the top level of _meta for all MCP servers, following the same pattern as threadId (which is already injected unconditionally via with_mcp_tool_call_thread_id_meta).

Use cases:

  • Tracing / observability: correlate client-side spans with server-side processing.
  • Audit logging: track which model action triggered which server-side operation.
  • Request deduplication: detect retried or duplicate tool calls on the server side.

Additional information

call_id is already a parameter of build_mcp_tool_call_request_meta. It just needs to be inserted unconditionally.

Happy to submit a PR with tests if the team is open to this change.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗