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
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
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_
2 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Fixed by https://github.com/openai/codex/pull/5979