Gemini API Now Changes Agent Rules Mid-Session Without Breaking the Cache

Google's Interactions API now accepts new system instructions and tool changes at any turn while earlier turns stay cached. We calculate what a rule change used to cost on Gemini 4 Neon, list the preview limits and explain why a tool list is no permission system.

Christopher Ort
By i10X News Desk · Reviewed by Christopher Ort · 3 min read
Share
A developer seen from behind typing at a desk at night beside a printed checklist and a pen.
Image: AI-generated, i10X
On this page
  1. The problem it solves
  2. What a rule change used to cost
  3. Limits before you build on it
  4. A tool list is not access control
  5. i10x Perspective

Google has added mid-conversation system instructions to the Gemini API. Developers can now change an agent’s rules or its list of tools at any turn of a session without invalidating the prompt cache, so the model does not have to reprocess the entire conversation. The feature is in public preview for all Gemini 4 models through the Interactions API (v1beta endpoint) and carries no separate fee. For anyone running long agent sessions, it removes a choice between two bad workarounds.

The problem it solves

Long-running agents work across dozens or hundreds of turns, and their rules change along the way: a user logs in, a plan gets approved, a downstream service goes offline. Until now, developers had two options. They could put new rules into a user message, which keeps the cache but gives the rule less weight and invites users to imitate it. Or they could rewrite the system instruction or tool list, which carries full weight but breaks the cache and forces the model to read everything again.

The new system_input step sits directly before the user message in a turn. It has the same authority as the top-level system instruction and takes precedence over user messages, while all earlier turns stay cached. Tools change through added_tools and removed_tools inside the same step, with the top-level tool list left unchanged.

What a rule change used to cost

Take an agent session with 200,000 tokens of history on Gemini 4 Neon. According to the Gemini API price list, uncached input costs $3.00 per million tokens and cached input $0.15. By our calculation, reprocessing the full history after a rewritten system instruction cost about $0.60, against about $0.03 when the history stays cached. Each rule change therefore cost roughly $0.57 extra, about 20 times the cached price. An agent that changes rules ten times in such a session saved around $5.70; at 1,000 sessions a day, that is about $5,700 a day.

One caveat: Gemini 4 Neon supports only implicit caching, which Google applies automatically, so cache hits are likely but not guaranteed. The new tokens in the system_input step are billed at the normal input rate.

Limits before you build on it

  • Preview and v1beta only. Support for Google’s enterprise agent platform is announced but has no date.
  • One step per turn. A single system_input step, placed directly before the user input.
  • Function tools only. added_tools and removed_tools work with function declarations, not with MCP server tools.
  • Newest rule wins. Instructions accumulate; when two conflict, the model favors the most recent one. Long sessions need a clear record of what is still in force, and the API lists every step in the interaction history for audits.

A tool list is not access control

Google itself warns that these steps steer the model and are no security boundary: the application should still authorize every function call on the backend and keep untrusted content out of system_input. That warning deserves weight. Removing a refund tool from the model’s list does not stop a manipulated request from reaching your refund endpoint. Our coverage of the FrontierBreach benchmark found hidden instructions hijacked enterprise agents in 34.9% of tests. Never pass text from emails, web pages or user uploads into the new step.

How we checked

Checked on 3 December 2026, 22:46 CET.

  • Google’s Gemini API announcement and the Gemini API pricing page, read December 3, 2026
  • The cost per rule change and the daily savings are our own calculations from list prices, assuming a full cache hit
  • We have not tested the feature ourselves; Google gives no latency figures

i10x Perspective

This is a small API change with a large effect on agent design. It lets developers grant and withdraw permissions per step without paying a cache penalty, which makes least-privilege setups cheap enough to use by default. We expect other model providers to follow, since every long-running agent faces the same problem. The risk is that teams treat the tool list as a permission system. It is a hint to the model, and real permissions still belong in the backend. Builders who already use Gemini 4 Neon, which in our review test caught bugs Opus missed, can try the new step on one workflow first.

Christopher Ort

Christopher Ort

Christopher Ort is the editor of i10X News at i10x.ai. He has worked hands-on with AI tools, models and agent workflows for years and leads i10X’s coverage of AI launches, funding and research. He is the author of “The Style Penalty”, an SSRN study on how frontier AI models judge AI-written CVs, covered by heise online and t3n.

Timeline

What happened before

  1. Release

    Gemini 4 Argon

    1.05M context · $2 / $10 per 1M tokens

    Google's most capable model for complex coding, agentic, math and science tasks.

    ai.google.dev (source, opens in a new tab)
  2. Release

    Gemini 3.8 Flash

    1.05M context · $0.75 / $3.75 per 1M tokens

    ai.google.dev (source, opens in a new tab)
  3. Release

    Gemini 3.7 Flash

    1.05M context · $0.75 / $3.75 per 1M tokens · Deprecated 8 Oct 2026 (API routes to Gemini 3.8 Flash)

    ai.google.dev (source, opens in a new tab)
  4. Release

    Gemini 3.6 Flash & 3.5 Flash-Lite

    1.05M context · $0.75 / $3.75 per 1M tokens

    ai.google.dev (source, opens in a new tab)
  5. Release

    Gemini 3.5 Flash

    1.05M context · $1.5 / $9 per 1M tokens · Deprecated 8 Oct 2026 (API routes to Gemini 3.6 Flash)

    Launched at I/O 2026 as the first Gemini 3.5 model; Google later dropped the planned 3.5 Pro.

    blog.google (source, opens in a new tab)
Full Gemini timeline ›

Editor's picks

  1. Anthropic’s Terraform Provider for Claude Agents: What Ends Up in Your State
  2. DoorDash breach: AI tools exposed names, addresses and phone numbers of users
  3. Hacked Next.js servers lose AI, cloud and crypto keys in React2Keys campaign
  4. Gemini API Now Changes Agent Rules Mid-Session Without Breaking the Cache
  5. FLUX 3.1 Image Costs Less Than Half of Nano Banana 2.1 at 1K: Price Check