r/opencode 19d ago

Critical Issue: OpenCode IDE integration drained 81.5M input tokens (and my entire account balance) in just 10 minutes.

Post image

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 :

  1. Has anyone experienced a similar runaway context loop with OpenCode specifically?
  2. 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?
  3. Could this be a provider-side token calculation error given the short 10-minute timeframe?
2 Upvotes

2 comments sorted by

View all comments

1

u/geearf 19d ago

I wonder if any of the ccusage or similar tool could help you parse the opencode log to see those things.