Gemini 3.7 Flash has caching issues

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

The screenshots below show how 207k window tokens turned into 855k input tokens.

Steps to Reproduce

N/a

Screenshots / Screen Recordings

Operating System

Windows 10/11

Version Information

Version: 3.17.3 (system setup)
VS Code Extension API: 1.128.0
Commit: ec2f9bf5a06f70cbf4e70a00aa94177a98c24120
Date: 2026-08-18T21:44:22.731Z
Layout: IDE
Build Type: Stable
Release Track: Nightly
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.291
OS: Windows_NT x64 10.0.22631

For AI issues: which model did you use?

Gemini 3.7 Flash

For AI issues: add Request ID with privacy disabled

d37f26a5-e0ca-49d9-9cc4-81bc91cc2bca Privacy on

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

hi @Artemonim Thanks for the post! I checked this run, and it seems like caching was working fine … The important distinction is that these panels measure different things, so the numbers are not expected to match.

  • 207.9K Context Usage is one snapshot. It shows how much context was in the model’s working prompt near the end of the run.
  • 855.1K Input Tokens is a cumulative total across all 123 model calls the Agent made during the run. It is not the size of any single prompt.

Each Agent step makes another model call using much of the growing conversation again. Across all 123 calls, the model processed 18.02M prompt tokens:

  • 17.16M were repeated context served from Gemini’s cache.
  • 855K were input tokens not served from cache, including newly added context and occasional cache misses.

So the 207.9K context did not “turn into” 855K input. The 207.9K is the approximate size of one late-stage prompt, while 855K is the sum of the uncached portions from 123 prompts. About 95.3% of the prompt tokens were served from cache. The displayed $2.13 matches that: without caching, the same cumulative prompt volume would have been approximately $13.72 at the published rates.

However, if there were no long pauses or the beginning of the prompt was not rewrited, then the input (or cache write) should match the final size of the session window (if no context summarization occurred).