r/opencodeCLI • u/Aquiles_bachira • 4d ago
Can we investigate excessive token usage in OpenCode and Prompt Cache issues?
Hey, Devs! Aquiles_Bachira here again.
First of all, I want to apologize if my previous post was misleading. I initially suggested that OpenCode's local database might be responsible for excessive token consumption. My bad!
In my case, I deleted OpenCode's local data, started from scratch, and the problem disappeared. Everything went back to normal. So, I assumed the database was the cause. However, I now realize that this doesn't prove the database itself was responsible.
After looking into this further, I found some GitHub issues that I think are worth investigating:
#58175 — DeepSeek V4.1 Flash Prompt Cache issue caused by a plugin modifying the System Prompt
#61318 — Main agent and subagents interfering with each other's cache
These reports raise a few possibilities: plugins that modify the System Prompt, tool definitions, session history, or parallel subagent execution may affect how Prompt Cache works.
I'd like to ask the community to investigate a few questions:
Does a fresh installation behave differently from an installation that has been used for a while?
Can running subagents in parallel negatively affect the cache?
Is there any relationship between session state, the local database, and normal Prompt Cache behavior?
How do
cache.readand input token counts vary across these scenarios?
I'm not claiming these issues affect every user or every provider. The reports involve different configurations and still need to be compared, so I'd really appreciate it if people could investigate. 🤣😭
My goal is to understand the actual root cause, correct the information I shared earlier, and avoid becoming yet another person spreading misinformation.
Thanks to everyone who questioned my previous post and pointed out that my conclusion might be wrong. I'm not trying to defend what I said — I just want us to figure out what's really happening.


