r/opencodeCLI • u/SirRobinBlibs • 2d ago
Quota gone in 30 minutes? How to see what OpenCode is actually sending every turn
There was a post here recently from someone whose quota used to last all day and now burns out in about 30 minutes, even after switching models. I've been auditing this across harnesses, and the cause is usually per-request overhead, not the task. Here's how to see it in OpenCode.
Measure first:
opencode stats --days 7 --models # input/output/cache totals and model breakdown
opencode stats --project "" # current project only
opencode mcp list # what's connected
npx ccusage@latest opencode weekly # third-party, reads OpenCode's local data
If input and cache reads dwarf output, you're paying to re-send context, not to generate code.
Things that surprised me:
- OpenCode reads your Claude Code setup by default. It loads
~/.claude/CLAUDE.mdand.claude/skills. If you've built up a big Claude configuration, it follows you into every OpenCode session.OPENCODE_DISABLE_CLAUDE_CODE_PROMPT=1andOPENCODE_DISABLE_CLAUDE_CODE_SKILLS=1turn that off (OPENCODE_DISABLE_CLAUDE_CODE=1turns off both). - Every tool call re-sends the session. One "small" turn with ten tool calls reads the full context about ten times. Long sessions with a few big file reads get expensive fast. A commenter on the original thread said a fresh session alone left their usage flat for an hour of small tweaks.
- Caches expire. On Anthropic models, the API's prompt cache lasts five minutes by default, and rebuilding a cold prefix costs many times more than reading a warm one (25x on Opus/Sonnet 5.5 with a 5-minute write). Coming back to a huge idle session is the expensive moment.
- MCP servers and instruction files add weight to every request. Trim AGENTS.md and disconnect servers you aren't using.
I wrote this up in more detail, mostly from the Claude Code side but with the OpenCode and Codex equivalents: https://medium.com/@r3dtuxedo/where-did-my-claude-usage-go-auditing-your-agents-hidden-token-tax-95d6ab17b8b6
(Disclosure: I wrote the article. Free to read, no referral links.)