Gemini preview API now preserves prompt cache when instructions or tools change mid-session

petrusenko_max · x · 2026-12-07

Per Gemini's preview API update, changing instructions or tool definitions mid-session no longer invalidates the prompt cache: a long-running agent can pick up new rules without paying to re-read the entire conversation. Previously any mid-session rule change forced a full re-read. A directly cost-relevant improvement for multi-hour agent workflows with frequently tweaked rules.

Original post →

More from coding & agent

coding & agent channel →