MCP tool results lose content when structuredContent is present (Codex App 26.803.81509)

Open 💬 3 comments Opened Aug 13, 2026 by eatmelonhan
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of the Codex App are you using (From “About Codex” dialog)?

26.803.81509 (build 6415) Also reproduced on 26.803.61601 (build 6396). After downgrading to 26.803.41515 (build 6321), the issue no longer reproduces.

What subscription do you have?

plus

What platform is your computer?

Darwin 24.6.0 arm64 arm

What issue are you seeing?

MCP tool call results lose their visible text (the content array) whenever the
result also contains structuredContent. The transcription layer that converts
MCP tool results into the assistant-visible function call output keeps only
structuredContent and drops content entirely.

Example: the built-in node_repl/js MCP server returns
content: [{"type":"text","text":"REINSTALL_TEST 1786582832541"}]
structuredContent: {"execution_duration_ms":0}
but the conversation only receives {"execution_duration_ms":0}. The text block
is never visible to the assistant. Code still executes and side effects still
happen, so this is purely an output-transcription bug.

Session evidence (rollout logs in ~/.codex/sessions/2026/08/12/, same call_id):

  • mcp_tool_call_end (raw JSON-RPC result received from the MCP server):

{"Ok": {"content": [{"type": "text", "text": "REINSTALL_TEST 1786582832541"}],
"structuredContent": {"execution_duration_ms": 0}, "isError": false}}

  • function_call_output (what is actually sent to the model):

Output: {"execution_duration_ms":0}
So content is complete on the server side and lost in the app-side transcription.

What steps can reproduce the bug?

  1. In any Codex session, call the built-in node_repl/js MCP tool with:

nodeRepl.write("x");

  1. The tool executes fine, but the conversation only sees

{"execution_duration_ms":0} instead of "x".

  1. In the same session, node_repl/js_reset returns normally (it has no

structuredContent field), which shows the bug only triggers when
structuredContent is present.

  1. Connecting directly to the node_repl binary over stdio

(initialize -> notifications/initialized -> tools/call) returns the full
content, confirming the MCP server itself is healthy.

What is the expected behavior?

content (the primary output per the MCP spec) should be preserved when
transcribing MCP tool results. structuredContent is an optional extra field
and should be merged with, or ignored in favor of, content.

Additional information

  • The regression appeared between build 6321 (26.803.41515, Aug 7) and build

6396 (26.803.61601, Aug 10): the newer node_repl starts attaching
structuredContent to js responses, which triggers the bug. Downgrading to
26.803.41515 makes it disappear.

  • Affects every tool routed through this MCP server, including the

computer-use/@oai/sky underlying channel.

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 15 days ago

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

  • #38225

Powered by Codex Action

eatmelonhan · 15 days ago

I'd really like to see an option to permanently delete past conversations rather than only archiving them. The current version makes managing history quite painful.

andykalyakin · 15 hours ago

Additional reproduction, likely the same host-side MCP output boundary but with a background job handle.

Environment: Codex Desktop code-mode JS bridge on macOS; MCP plugin opencode-plugin-codex 0.2.3; OpenCode CLI 1.18.18.

A background opencode_run call returned both normal text content and structuredContent. The OpenCode session was created (later visible through the plugin's read-only opencode_sessions tool), but the host invocation failed before exposing the typed envelope/jobId:

Script error:
failed to serialize JavaScript value: expected value at line 1 column 1

The lost jobId then prevents the documented opencode_result lifecycle and leaves the task outcome unverifiable. An independent check of the temporary workspace showed the requested edit had not appeared and its Node test still failed.

Control: opencode_sessions from the same MCP plugin returned a structuredContent envelope successfully in the same Codex task. This suggests the trigger may be the opencode_run/background-result shape rather than MCP availability or the OpenCode CLI itself.

Expected behavior: preserve the MCP response, or surface a typed, actionable serialization error while retaining the returned jobId whenever the side effect has already started.