Google adds mid-conversation rules to Gemini API
Listen to Briefing
0:00/1:40

What happened.Google launched mid-conversation system instructions and tool updates in public preview across all Gemini 4 models through the Interactions API on December 3, 2026. Developers pass a `system_input` step at any turn boundary to update agent rules or swap functions without breaking the prompt cache.
Why it matters.Long-running agents previously forced teams to leak dynamic rules into user prompts or break prompt caches whenever permissions changed. Gemini 4 builders should move session policy switches and function swaps into `system_input` steps to cut latency and block user impersonation.
The technical specifications:
- Cache preservation: Placing `system_input` directly before `user_input` while keeping top-level `system_instruction` and `tools` unchanged lets earlier turns stay cached.
- Rule authority: A `system_input` step carries top-level system priority over user messages, stays active across turns, and wins conflicts over older rules.
- Dynamic tools: Developers swap functions mid-session with `removed_tools` and `added_tools` on `v1beta`, though MCP server tools lack support yet.
- Trace and cost: Each `system_input` step logs in `client.interactions.get` traces at standard input token rates, with no extra fee.
- Backend guard: Google warns teams to exclude untrusted user text from `system_input` and authorize function calls on the backend.