Google Lets Gemini Developers Change Agent Rules Mid-Session Without Breaking Cache
Google's December 3, 2026 preview adds system_input to the Gemini Interactions API, letting agents update instructions and tools mid-session while cached tokens and prior turns stay valid.

Why it matters
- Google launched the mid-conversation instruction preview on December 3, 2026 via the v1beta Interactions API.
- The system_input step preserves cached tokens because updates append at the turn boundary, keeping prior conversation history identical.
- Only gemini-4-carbon, gemini-4-neon and gemini-4-hydrogen are supported; other models return HTTP 400.
- Instructions accumulate rather than replace, so reversing a rule requires explicitly telling the model to ignore the earlier instruction.
- system_input tokens bill at standard input-token rates; earlier turns stay eligible for cached-token rates, with Gemini Enterprise Agent Platform support coming soon.
Google opened a public preview on December 3, 2026 that lets Gemini API developers update system instructions and function tools mid-conversation without invalidating cached prompt tokens. The capability arrives through the Interactions API. It adds system-level controls for agents whose rules and permissions shift during a session.
The change targets a real cost problem. Long-running agents can span dozens or hundreds of turns. During that time, spending limits, account permissions and available functions may change. Developers previously had two imperfect workarounds. Inserting instructions into user messages preserved the cache but lacked top-level system authority — and users could imitate it. Rewriting the system instruction or tools list invalidated the cache and forced the model to reprocess the full conversation history, adding cost and latency.
The new system_input step carries the same authority as the top-level system instruction and takes precedence over user messages. Earlier turns remain cached.
How does the update preserve the cache?
The mechanics are append-only. To make an update, the application chains the new turn with previous_interaction_id. The server then retrieves stored conversation history rather than requiring the application to resend it.
The request format places one system_input step immediately before user_input. The top-level system_instruction stays unchanged. Because the new step lands at the current turn boundary, all preceding tokens remain identical. That preserves the cached prompt prefix — the whole point of the feature.
Each update becomes a separate history step rather than a replacement. The original system instruction and all previous system_input steps remain in context. Nonconflicting rules continue together. When rules conflict, the model favors the newest instruction.
Reversing a rule takes explicit work. Previous steps cannot be removed, so Google recommends stating what changed and telling the model to ignore the earlier instruction.
Retrieved interactions list these steps chronologically alongside user input, model output and tool changes. That creates an inspectable record for debugging — a quiet but significant benefit for teams running agents in production.
What does the infrastructure example show?
Google's worked example makes the intended sequence concrete. An assistant is troubleshooting a latency spike. Mid-session, it receives a new production deployment freeze, with instructions to recommend read-only diagnostics and prevent further rollouts.
A user then asks for the command to deploy a release. The example's model reply declines the release and offers diagnostic checks instead. The new rule applies without resetting the earlier session — exactly the behavior the feature is built to deliver.
How do function tools update?
Applications keep sending the original top-level tools list, including functions that have been disabled. They then use removed_tools and added_tools on system_input to change the active set. Changes persist until a later update.
When both fields appear together, removals are processed before additions. That ordering allows a function definition to be replaced in one step.
There are limits. Only custom function tools are supported. MCP servers and built-in tools such as Google Search and code execution are not.
The fields steer model behavior; they do not enforce application permissions. Google advises authorizing every function call on the backend before execution. It also advises keeping untrusted external or end-user content out of system_input. That distinction is central to real uses:
- Enabling write tools after authentication
- Disabling functions during a downstream outage
- Expanding a large tool catalog only when a task requires it
Which models support it, and what does it cost?
The preview requires the v1beta Interactions API. Its API surface may change before general availability, so production code should treat it as provisional.
The documentation lists support for three models: gemini-4-carbon, gemini-4-neon and gemini-4-hydrogen. Other models return HTTP 400. The feature is also limited to model interactions, leaving generateContent requests and agent interactions unsupported.
Malformed requests fail with HTTP 400 in several scenarios:
- A standalone system_input
- One sent during a function-result loop
- Later requests that drop a removed function from the original top-level tools list
Added tools must similarly remain outside that top-level list rather than being declared again on subsequent turns.
There is no separate fee for mid-conversation instructions. Tokens in system_input are billed at the called model's standard input-token rates, while earlier turns remain eligible for cached-token rates — the pricing structure that makes the append-only design economically worthwhile. Google says Gemini Enterprise Agent Platform support is coming soon.
What's the catch?
The preview gives long-running agents an inspectable way to change policy and capabilities as conditions shift while retaining conversational context. Its main constraint is the append-only design: cached history survives an update, but old instructions remain present. And backend authorization — not the revised tool list — ultimately determines which actions can execute. For teams building session-long agents, the useful question now is whether their authorization layer is ready to carry the weight the tool list only pretends to.
Source: unite.ai
More from Elena Vasquez
Show full bio
Market editor covering technology and product news in artificial intelligence and machine learning at AI In Context.
1,060 articles