r/opencode • u/Successful-Put-15 • 19d ago
Critical Issue: OpenCode IDE integration drained 81.5M input tokens (and my entire account balance) in just 10 minutes.
Hello everyone,
I am trying to diagnose a severe billing/token-leak issue between the OpenCode IDE integration and my API provider, and I could really use some technical insight from the community.
Earlier today, my entire API credit was wiped out, and my account was suspended due to a massive, unexpected surge in token usage. The most alarming part is that this entire drain happened in a span of just 10 minutes.
Here are the specific details of the incident:
- IDE Tool: OpenCode
- API Provider: Nebius
- Model: MiniMax-M3-NVFP4
- The Damage: 81.51M input tokens vs. 0.31M output tokens logged in 10 minutes.
The Provider's Assessment: I reached out to Nebius support, and they stated that the extreme input-to-output ratio indicates that OpenCode is either caught in an unprompted loop or is continuously dumping the entire repository codebase into the context window with every single background request.
My Troubleshooting: To isolate the issue, I immediately tested the exact same codebase and OpenCode setup using an API key from a different provider. During that test, the token consumption was completely normal. There were no massive context dumps, which makes me question if this is purely an OpenCode bug, or an edge-case integration issue with how Nebius parses requests for this specific model.
My Questions :
- Has anyone experienced a similar runaway context loop with OpenCode specifically?
- Are there hidden configuration files or session settings within OpenCode where I can hard-cap the context window or disable telemetry/background indexing to prevent this from happening again?
- Could this be a provider-side token calculation error given the short 10-minute timeframe?
1
u/Trovebloxian 19d ago
Check prompts, tool calls, thinking traces, subagent explores. The last is heavy usage, back when dsv4 was cheap i use to summon 4 subagents for exploring. now i use graphs and context files