Claude’s New addTools() Can Reuse 98.7% of Your Next Request. Editing tools[] Reuses None.
Author(s): Chew Loong Nian – AI ENGINEER Originally published on Towards AI. Anthropic’s SDK 0.128.0, released with Claude Opus 5.5, can hand the model a new tool mid-run without touching tools[]. It needs one beta flag the runner won’t add for you. If your Claude agent picks up a new tool halfway through a long conversation, the way you add it decides how much of the next request can still come from the prompt cache: 98.7% of it with the new runner.addTools(), none if you edit tools[]. The article explains what changed in Anthropic’s SDK 0.128.0: a new inline tool runner supports addTools() and removeTools(), allowing tools to be added during an active conversation. It contrasts this with the older approach of editing tools[], which is expensive because tool definitions sit at the front of the cached prompt prefix—so changing them invalidates the entire cache. With addTools(), the existing cached prefix remains intact and the new tool is sent as an appended system message, yielding very high request reuse (measured up to 98.7% on a 40-turn conversation). It provides a no-API-key Node.js script to measure request-body reuse, shows how the cache-reuse gap grows as conversation leng…