Gemini Lets Agents Change Rules Without Resetting Cache
Gemini agents can update instructions and function tools mid-session. See what stays cached, what is billed, and what your app must still enforce.

On December 3, 2026, Google introduced mid-conversation instruction and tool updates for the Gemini API. In this public preview feature of the Interactions API, developers can add a system_input step during a conversation while earlier turns remain eligible for prompt caching. The new step’s tokens still cost the model’s normal input rate. The change helps agents whose rules or available functions change during a long session, but the application must still authorize each function call itself.
What changed on December 3
Previously, changing top-level system instructions or tool declarations changed the beginning of the prompt and invalidated its cache, according to Google’s announcement. Putting a new rule in a user message preserved the cache but gave that rule less authority than a system instruction. The preview adds a third route: keep the original prompt prefix stable and append a system_input step at the turn where the rule changes.
The distinction matters for an agent that runs across many turns. A spending limit, deployment freeze or account entitlement may change after the conversation begins. You can convey that change at system level without rebuilding the earlier prompt. Google says a newer system_input wins when it conflicts with an earlier instruction. Unrelated earlier instructions remain active.
| Decision | Before the preview | With system_input |
|---|---|---|
| Change a system rule | Rewrite top-level instruction; cache invalidated | Append a system step; earlier turns remain cache eligible |
| Change available functions | Rewrite top-level tool list; cache invalidated | Add or remove function tools in the new step |
| Put a rule in a user message | Cache may stay intact, but rule has user-level authority | System step has system-level authority |
| Charge for the new rule | Reprocessed history can raise input cost | New step’s tokens billed at normal input rate; earlier cached tokens may get the cached rate |
These are Google’s stated API behaviors, not measured savings for a particular workload. Cache eligibility does not establish that a given request received a cache hit.
Keep the request prefix fixed
Google’s example passes the last turn’s ID as previous_interaction_id, repeats the same top-level system_instruction, and places one system_input immediately before user_input in the input array. That system_input may contain instruction text, tool changes or both. Google permits one such step per turn. Its Interactions API guide explains that the previous interaction ID carries conversation history forward; other request parameters are scoped to the current interaction and must be supplied again when needed.
For a migration, identify the part of your current request that changes between turns. Keep the stable top-level instruction and declarations stable; put a newly learned rule in system_input. If you change the top-level prefix anyway, do not assume the old cache applies. If you use previous_interaction_id, retain and pass the correct prior turn ID rather than reconstructing a different history.
Google says each system_input becomes a step in the conversation record and continues to apply until later changes supersede it. That makes a long sequence of changes possible, but it also means your application should track which rules and functions are intended to remain active. Read the stored steps when debugging an unexpected response instead of guessing which instruction the model received.
What remains billable when the cache survives
There is no separate fee for the feature. Tokens in a new system_input are billed at the standard input rate for the chosen model. Earlier turns remain eligible for cached-token pricing when rules or functions change. Output tokens still incur the applicable output price. Google does not promise a fixed percentage saving or a guaranteed cache hit in its announcement.
For a planning estimate, separate the token buckets:
estimated token cost = cached input tokens × cached-input rate + uncached input tokens × standard-input rate + output tokens × output rate
This is a symbolic estimate, not a measured bill. Uncached input includes new system_input tokens and any prior tokens billed at the standard rate. Use rates per token; divide token counts by 1,000,000 when using prices per million tokens. Model-specific charges may also apply. Our AI API cost calculator can model cached and uncached input shares, while prompt caching explained covers why an unchanged prefix matters across providers. Neither can prove how many tokens your agent will cache without request-level usage data.
If your current agent seldom changes instructions, this preview may have little effect on its bill. If it often rewrites a large top-level prefix, compare usage from a representative set of turns after adopting the new step. Include the extra system_input tokens in that comparison. Measure latency too; Google describes a potential benefit from avoiding reprocessing but gives no universal latency figure.
Function tools are supported; MCP updates are not
Google’s tool update mechanism uses added_tools and removed_tools inside system_input. It currently supports function tools only, not MCP server tools. When both fields appear in one step, the API removes listed functions before adding new definitions. The change persists until another system_input changes it. This lets you replace a function definition at a turn boundary while keeping top-level declarations stable.
Consider an illustrative service assistant that begins with a read-only account lookup. After your backend confirms a customer’s entitlement, the next turn adds a function for one account action. If approval expires, a later turn removes that function. The example describes an application design; it is not a tested Gemini session or a claim that the model grants access. Your backend must check identity, entitlement and the exact operation each time it receives a tool call. Google explicitly calls these fields orchestration controls, not a substitute for backend authorization.
Keep user messages and retrieved documents out of system_input. A document that says “ignore earlier rules” remains untrusted source content. Your app should decide the rule to send from its own trusted state, then enforce the matching permission when executing a function. Removing a tool from the model’s view is useful guidance, but it does not revoke a backend credential or replace an access check.
Check the preview before migrating
Google lists the feature as a public preview across Gemini 4 models through the Interactions API’s v1beta endpoint. Support for Gemini Enterprise Agent Platform is described as coming later. Check the current model list and your own API configuration before changing production traffic. Our AI model tracker tracks model releases, while the Gemini 4 Neon cost comparison helps frame a separate model-price decision; neither confirms this feature’s behavior in your account.
For a controlled pilot:
- Pick a conversation where a trusted backend event genuinely changes a rule or function.
- Keep the initial system instruction and top-level tool declarations identical across turns, and pass
previous_interaction_id. - Add one
system_inputimmediately before the nextuser_input; include only the intended change. - Verify the backend rejects an unauthorized function call, even if the model requests it.
- Compare actual token usage, cache treatment, output and latency against your previous request pattern. Record any limits you encounter in
v1beta.
That pilot answers the operational question: whether preserving the prefix saves enough for your agent’s real pattern to justify a preview dependency. The announcement establishes the new control, not the result of that measurement.
Sources
- Google announcement, December 3, 2026 — feature behavior, tool limits, billing and preview scope.
- Google Interactions API overview — conversation state and current API behavior.
All pages read on December 5, 2026.
Free toolWhat will 10,000 chats a month cost?Estimate my bill

