Why I've paid 55k tokens on some cache read on new chat

What is in that cache. I’ve reopened Cursor after not using it a while ( after trial expired ) bought the Pro+ subscription opened a single file and asked:

Change ToggleSwitch from horizontal to vertical and make the knob more square with rounded corners. Also please print out the scope/context you have used at the end.

it correctly did the job and at the end printed:

Scope/context used
File: pkg/ui/toggle.go (full file read).
Scope: Only this file was edited; no other packages or call sites were opened.
APIs: Fyne v2 (fyne.io/fyne/v2, canvas.Rectangle, fyne.Size, fyne.NewPos, fyne.NewSize), existing ToggleSwitch and toggleRenderer types.
Behavior: Toggle remains off = bottom, on = top; tap still toggles and calls OnChanged; colors and SetChecked unchanged.
No: Other UI files (e.g. reminder-list.go), tests, or assets were read or modified.

And in usage page this little prompt generated almost 79k tokens 55k of which is some cache read!?

The cache read tokens are coming from Cursor loading the Fyne v2 library context into its prompt. Cursor likely has a system prompt or tool-use block that loads relevant Go package documentation or type stubs for the libraries it detects in your file.

Fyne is a fairly large GUI framework. Cursor had already paid to build that Fyne/system-prompt context in a previous request (or during initialization), and you only got charged for the cache read rate, which is typically ~10% of the full input token cost. Without caching, that single prompt could have cost 5–10x more.

1 Like