Skip to content

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

Closed

Description

@tylerstraub

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

Activity

  1. added
    mcpIssues related to the use of model context protocol (MCP) servers
    on Oct 22, 2025
  2. github-actions commented on Oct 22, 2025

    @github-actions
    Contributor

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

    Powered by Codex Action

  3. gpeal commented on Nov 4, 2025

    @gpeal
    Contributor

    Fixed by #5979

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmcpIssues related to the use of model context protocol (MCP) servers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions