MCP tool call fails with transport disconnect and invalid CallToolResult (missing content) on gpt-5.1-codex-max

Resolved 💬 1 comment Opened Nov 22, 2025 by hayhu Closed Jan 31, 2026

What version of Codex is running?

codex-cli 0.63.0

What subscription do you have?

Custom plan

Which model were you using?

gpt-5.1-codex-max

What platform is your computer?

Windows 10 Enterprise 24H2 (Build 26100) 26100.1.amd64fre.ge_release.240331-1435

What issue are you seeing?

When invoking an MCP tool (codex), Codex reports a transport disconnect and then the client fails to validate the response as CallToolResult because content is missing.

Error:
{
"error": "Error invoking MCP tool codex: 1 validation error for CallToolResult\ncontent\n Field required [type=missing, input_value={'error': 'stream disconn...not have access to it.'}, input_type=dict]\n For further information visit https://errors.pydantic.dev/2.12/v/missing",
"tool_name": "codex"
}

Call parameters (sanitized)
codex({
"approval-policy": "never",
"sandbox": "danger-full-access",
"model": "gpt-5.1-codex-max",
"cwd": ".",
"developer-instructions": "[REDACTED]",
"base-instructions": "[REDACTED]",
"prompt": "[REDACTED]"
})

What steps can reproduce the bug?

Steps to Reproduce

  1. Start an MCP server that exposes a tool named codex.
  2. From Codex, invoke the tool with the call parameters below (sanitized).

Call parameters (sanitized)
codex({
"approval-policy": "never",
"sandbox": "danger-full-access",
"model": "gpt-5.1-codex-max",
"cwd": ".",
"developer-instructions": "[REDACTED]",
"base-instructions": "[REDACTED]",
"prompt": "[REDACTED]"
})

What is the expected behavior?

Even on error, Codex should receive a valid MCP CallToolResult:

{
"content": [
{ "type": "text", "text": "stream disconnected. The server may have crashed, rate limited, or you do not have access to it." }
],
"isError": true
}

Additional information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗