Adding and Removing Tools Mid-Conversation
Without busting the prompt cache
Anthropic's mid-conversation tool changes (beta) lets Claude swap tool sets dynamically during long tasks — released 07-24 alongside Opus 5, with Opus 4.8 / Fable 5 / Mythos 5 supported at the same time.
Highlights
Release date
One of two betas shipped with Claude Opus 5 — verifiable in the official announcement.
Supported models
Opus 5, Opus 4.8, Fable 5, Mythos 5. Nothing else for now.
Core mechanism (+ removal)
tool_addition / tool_removal blocks add or drop tools mid-conversation, with no need to restart the session.
Effect on prompt cache
The design goal is precisely that adding/removing tools does not invalidate the cached prefix — the key to long-task costs.
What this feature solves
The old pain of long-horizon agents: you hang 50 tools on at task start, then pay tokens for them every turn while they dilute attention; or halfway through you need a new tool and have to restart the session, losing all context. Mid-conversation tool changes allows loading and unloading tool sets on the fly via tool_addition / tool_removal blocks — context and prompt cache both survive.
Ecosystem adoption
OpenRouter's Opus 5 migration guide and the Vercel AI SDK docs both cover the beta; agent frameworks like openclaw followed up by late July. There's a known pitfall in relay-gateway setups: some gateways drop the beta header or strip tool_addition blocks — the symptom is 'the model pretends not to see the new tool.' If you hit this, check the forwarding chain first.
Timeline
A similar but different beta: mid-conversation system messages (don't confuse them — the header differs).
Mid-conversation tool changes ships with Opus 5, header mid-conversation-tool-changes-2026-07-01.
Major SDKs and gateways finish adapting; relay-forwarding issues are documented across several GitHub issues.
Confirmed vs easily confused
Confirmed
The beta header name, the four supported models, the tool_addition/tool_removal mechanism, and the non-invalidation of prompt cache — all verifiable in the official announcement and major SDK docs.
Easily confused
Don't mix this up with the 04-07 mid-conversation system beta (inserting system messages mid-conversation): the two are independent betas with different headers solving different problems. On forwarding chains, confirm both headers get passed through.
Use this beta or not
Good fit
Long-horizon agents whose tool sets change by phase and whose costs are prompt-cache-sensitive — typical cases: multi-stage migrations, module-by-module refactors.
Skip it
Scenarios with a fixed tool set and short sessions. One more beta header is one more layer of link uncertainty — don't force it onto simple tasks.
How to use it
Add the request header anthropic-beta: mid-conversation-tool-changes-2026-07-01; mid-conversation, attach new tools with tool_addition blocks and unload them with tool_removal blocks. The model just needs to be one of Opus 5 / 4.8 / Fable 5 / Mythos 5. When going through a gateway, confirm the header and the new blocks are both forwarded.
On QCode
QCode's Claude-series routes pass the anthropic-beta header through, and all four supported models are on sale at official pricing times our service rate. Integration is identical to going direct: same key, same endpoint, header carried as usual.
FAQ
What is the beta header?
anthropic-beta: mid-conversation-tool-changes-2026-07-01. Include it in the request header to enable the feature.
Which models support it?
Opus 5, Opus 4.8, Fable 5, Mythos 5. No other models for now.
Will it bust the prompt cache?
No — that's the feature's design goal: adding/removing tools doesn't invalidate the cached prefix. If your cache hit rate suddenly drops, first check whether a relay in the chain rewrote the request body.
Is it the same thing as mid-conversation system?
No. That's a separate beta from 04-07 (inserting system messages mid-conversation) with the header mid-conversation-system-2026-04-07, solving a different problem.
What if the model can't see new tools behind a gateway?
A classic symptom of the known pitfall: some gateways drop the beta header or strip tool_addition blocks. First reproduce with a direct curl, then inspect the forwarding chain hop by hop.
Can beta features be used in production?
Official betas are usually stable enough for production, but validate on non-critical paths first and watch the changelog for graduation/breaking-change notices.
Sources
Anthropic's official announcement (2026-07-24, Claude Opus 5), OpenRouter's Opus 5 migration guide, Vercel AI SDK docs, openclaw GitHub issues.
Long-task savings start with the cache
QCode passes the anthropic-beta header through — all four supported models callable on the same key.
Related reading
Claude Opus 5 guide
The flagship released the same day as this beta.
Claude Code MCP guide
Another way to extend at the tool-protocol layer.
Context engineering
Context and cache management in long tasks.
Not affiliated with Anthropic. Beta behavior follows the official documentation.