AI / Claude OPUS5 Interview questions
Explain the execution flow of mid-conversation tool changes in Claude Opus 5?
In a standard agentic session prior to this feature, the tool list provided in a request needed to stay fixed for the life of the conversation - changing which tools were available on a later turn would invalidate the prompt cache built up from earlier turns, forcing an expensive cache miss.
With mid-conversation tool changes enabled, a developer can submit a later turn in the same conversation with a modified tool list, adding a newly relevant tool or removing one that's no longer needed for the current stage of the task, and the underlying prompt cache from earlier turns remains valid rather than being invalidated by that change.
This makes it practical to structure an agent's capabilities progressively - for instance, starting a task with only read-only, investigative tools available, then adding a deployment or write-access tool only once the task reaches a stage where that's appropriate - without paying a caching penalty each time the tool set changes.
This is currently a beta capability accessed through a specific mechanism rather than a universally-on default, so it needs to be explicitly enabled to take effect.
flowchart LR
A[Turn 1: initial tool list] --> B[Prompt cache built from turn 1]
B --> C[Turn 2: modified tool list submitted]
C --> D{Mid-conversation tool changes enabled?}
D -- Yes --> E[Cache from turn 1 remains valid]
D -- No --> F[Cache invalidated, forcing a cache miss]
More Related questions...