[Bug] Prompt Caching Not Working - Rapid Token Usage Depletion
Status Fixed / completed
Reported on v2.1.59
Maintainer reply None cached
Activity 8 comments · opened Feb 26, 2026 · closed Mar 1, 2026
Bug Description
there seems to be no caching. i ran out of usage way too quickly. a bug in the latest version .
Environment Info
- Platform: darwin
- Terminal: vscode
- Version: 2.1.59
- Feedback ID: 00bb6e69-4afa-441e-905c-3c2cc2995267
8 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Yes, I also encountered this problem and found that Input token Surging, is there any solution? You can use it when you go back to any version.Opus 4.6, and this problem won't occur?
Same here...
Same here, hit my weekly limit with 1 session within a few hours on a 20x Max plan. I've only hit my rate limits 1-2 times over the past year
The "no caching" feeling is real, Claude Code re-reads files from scratch on every request, even if nothing changed.
There's no structural awareness of what's relevant, so it reads everything just in case.
One approach that helped me: instead of letting the agent read files directly, serve it a pre-computed dependency graph via MCP. The agent gets only the code nodes relevant to the task (functions, classes, their connections) instead of entire files. Same info, ~70% fewer tokens.
I packaged this into an MCP server called vexp if anyone wants to try it, but even without it, adding a CLAUDE.md with explicit "don't read files unless you need them, use tools first" helps reduce the waste a bit.
That has nothing to do with caching...
Yeah something is DEFINITELY broken I've spent over 500$ in API usage in 3-4 hours just for one thing and im not happy about that. here is an example. It is with openrouter the initial token estimate claude gave me was 198781 toekns
---
`❯ /model
⎿ Set model to opus[1m] (claude-opus-4-6[1m])
❯ analysiere das jetzt alles gegen die cognee src
⏺ Ich analysiere unsere Graph-Architektur gegen den tatsächlichen Cognee Source Code. Zuerst muss ich verstehen wie Cognee Edges, Properties, und GRAPH_COMPLETION technisch handhabt — um zu prüfen ob unser Design (Anwendungs-Nodes, reiche
edge_texts, Property Graph) überhaupt funktioniert.
Lass mich parallel die kritischen Source-Dateien lesen:
⏺ Read(cognee/cognee/infrastructure/engine/models/DataPoint.py)
⎿ Read 223 lines
⏺ Read(cognee/cognee/infrastructure/engine/models/Edge.py)
⎿ Read 39 lines
⏺ Read(cognee/cognee/modules/graph/utils/get_graph_from_model.py)
⎿ Read 313 lines
⎿ Loaded cognee/CLAUDE.md
⏺ Jetzt die kritischen Retriever-Dateien:
⏺ Read(cognee/cognee/modules/retrieval/graph_completion_retriever.py)
⎿ Read 295 lines
⏺ Read(cognee/cognee/modules/retrieval/utils/brute_force_triplet_search.py)
⎿ Read 209 lines
⏺ Jetzt die kritische Datei — wie Edges zu Text aufgelöst werden für den LLM-Kontext:
⏺ Read(cognee/cognee/modules/graph/utils/resolve_edges_to_text.py)
⎿ Read 111 lines
⏺ Read(cognee/cognee/tasks/storage/add_data_points.py)
⎿ Read 238 lines
⏺ Jetzt noch die Graph-Projection und wie Edges in Neo4j gespeichert werden:
⏺ Explore(Find Neo4j edge storage details)
⎿ Done (8 tool uses · 0 tokens · 34s)
(ctrl+o to expand)
⎿ API Error: 402 {"error":{"message":"Insufficient credits. Add more using https://openrouter.ai/settings/credits","code":402}}
✻ Cogitated for 2m 31s
`
This request cost me 13,5$ in API usage, and looking into OpenRouter Logs
---
---
then look at this this is even more ridicolous
`❯ /model
⎿ Kept model as opus[1m] (claude-opus-4-6[1m])
❯ PLACEHOLDER_OF_MY_PROMPT
⏺ Ich lese zuerst die aktuelle Datei vollständig, damit ich sie komplett überschreiben kann ohne Information zu verlieren.
⏺ Read(~/.claude/projects/-Users-jurgen-AgentRuns-BergfeldTactics/memory/cognee-test-results.md)
⎿ Read 500 lines
⏺ Read(~/.claude/projects/-Users-jurgen-AgentRuns-BergfeldTactics/memory/cognee-test-results.md)
⎿ Read 500 lines
⏺ Read(~/.claude/projects/-Users-jurgen-AgentRuns-BergfeldTactics/memory/cognee-test-results.md)
⎿ Read 131 lines
This request was another 10$ UP TO THIS.
---
I paid 3$ per read tool call and looking into openrouter logs its clear that thats because none of the requests was cached.
I would complain to OpenRouter about this not Anthropic if this issue with Claude Console was not the exact issue that made me try if switching to OpenRouter fixes it.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.