Skip to content

Token cache rate drops drastically when using more than one MCP tool #2610

@warpdev

Description

@warpdev

What version of Codex is running?

0.23.0

Which model were you using?

gpt-5

What platform is your computer?

Darwin 24.6.0 arm64 arm

What steps can reproduce the bug?

When multiple MCP tools are connected, token caching barely works.

Here’s how to reproduce:

Add an MCP server with multiple tools to config.toml and run tests. As shown in the screenshot below, almost no caching occurs.
In contrast, if you remove all MCP servers from config.toml, or configure only a single MCP server that contains just one tool, caching works normally as shown below.

With MCP Without MCP
Image Image

What is the expected behavior?

Token caching should work properly even in sessions that include MCP servers.

What do you see instead?

When multiple MCP tools are configured, almost no tokens are cached, resulting in extremely low cache hit rates.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions