MCP Server tool call output is not tracking properly with context management system (unexpected overflow)

Resolved 💬 2 comments Opened Oct 22, 2025 by tylerstraub Closed Nov 4, 2025

What version of Codex is running?

0.47.0

What subscription do you have?

Azure Deployed gpt-5-codex

Which model were you using?

gpt-5-codex

What platform is your computer?

Linux

What issue are you seeing?

The context window management does not seem to track tool output when using MCP Server provided tools. You can run out of context in an interactive session and get yourself into an unrecoverable state because it appears that the MCP tool output is not being tracked by the context management system today.

What steps can reproduce the bug?

Be in interactive mode

Run any MCP Tool call that produces a large amount of output.

Observe that the "% context left" does not reflect the actual context window produced by the tool calls

What is the expected behavior?

Context is tracked accordingly even with MCP Server tool calls.

Additional information

_No response_

View original on GitHub ↗

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