How Claude Code uses prompt caching changedprompt-caching
Nearest release: v2.1.330, published 3 hours after upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Upstream edited this page at 20 Nov 2026 16:02 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 20 Nov 2026 16:07 UTC.
Upstream edited
Recorded here
Lines+1added
Lines−1removed
From line
117
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits65to this page, all time
The whole hunk
from line 117, old and new numbered
/
from line 117
117117| Mid-session change | Cache | Tool definitions in the next request |
118118| - | - | - |
119119| A server connects, or a [dynamic tool update](https://code.claude.com/docs/en/mcp.md#dynamic-tool-updates) adds tools | Invalidated | The new definitions are added |
120| A server drops out with no action on your part, such as a stdio server's process exiting | Kept | The server's definitions stay unchanged. A call to one of its tools returns an error instead of running, unless Claude Code [starts the server again](https://code.claude.com/docs/en/mcp.md#stdio-servers-that-exit-or-fail-to-start) for that call |
120| A server drops out with no action on your part, such as a stdio server's process exiting | Kept | The server's definitions stay unchanged |
121121| A remote server [reconnects automatically](https://code.claude.com/docs/en/mcp.md#automatic-reconnection) after its connection drops | Kept, unless a request sent while the server reconnects adds the `WaitForMcpServers` tool, which invalidates the cache once | The server's definitions stay unchanged. A request sent while the server reconnects can add `WaitForMcpServers` when the conversation hasn't listed it yet, and the tool then stays listed for the rest of the conversation |
122122| You remove a tool on purpose, such as with a [deny rule](#denying-an-entire-tool) or by disabling its server in `/mcp` | Invalidated | The definition is removed |
123123
No line in this hunk matches that.