OpenCode Breach: How to Revoke Your AI API Keys and Stop Unauthorized Charges

Attackers broke into an older OpenCode Console system and used stored OpenAI, Anthropic and Google API keys to run up charges. Here’s who was affected, how to rotate your keys, and how to cap AI spending so a leaked key can’t drain your account.

By Oscar Leiva

4–6 minutes
Illustration of a glowing digital API key being copied, with a rising usage chart in the background

Last updated: October 20, 2026

The quick answer

OpenCode, an open-source AI coding agent, says attackers got into an older system behind its OpenCode Console and exposed AI provider API keys that 1.4% of Console users had stored there, and some victims saw hundreds of dollars in charges they didn’t make. If you got a breach email from OpenCode, revoke those keys directly with OpenAI, Anthropic or Google, issue new ones, and check your usage; if you only use the open-source app or command-line tool, OpenCode says you weren’t affected.

What happened

OpenCode is a popular open-source alternative to tools like Claude Code and Cursor. Alongside the free app, it runs OpenCode Console, a web platform where some users save the API keys that connect the tool to paid AI models. On Saturday, October 17, OpenCode disclosed that an unauthorized party had accessed a legacy system it was in the process of retiring, and that third-party keys stored in user workspaces may have been exposed.

According to TechCrunch and Notebookcheck, developers began reporting spending alerts and unexpected bills overnight. Individual users described charges in the hundreds of dollars, and a few said their totals topped $1,000. One person reported their Google project was suspended for abuse after the key was misused. OpenCode called the event a “large-scale distillation attack,” meaning the stolen access was allegedly used to harvest AI model outputs, though it hasn’t explained how the attackers got in, and TechCrunch notes some skeptics see it as a plain breach.

The response has been fast on the provider side. TechCrunch reports that Anthropic and Google blocked keys they believed were exposed, and that OpenAI worked with OpenCode to restore access and refund affected API customers. OpenCode says refunds for unauthorized charges are underway and that the incident is still ongoing.

Part of OpenCodeAffected?
OpenCode Console accounts with linked external AI providersYes, for 1.4% of Console users, who were emailed
Console users who received no emailNo, according to OpenCode
Open-source desktop app and command-line toolNo; keys used there are not sent to OpenCode, per the company

What changes for you

An API key works like a prepaid card number for AI services: anyone holding it can spend your credit or run up your bill until the key is revoked. Unlike a password, it usually isn’t protected by two-factor authentication. That’s why a leak at a third-party tool translates directly into charges on your OpenAI, Anthropic or Google account.

Even if a provider has already blocked your key, any app or script that used it will stop working until you add a new one. Some Notebookcheck readers also reported trouble signing in to OpenCode or getting a working replacement key from the service in the hours after the incident.

What to do now

  1. Check your email for OpenCode’s notice. Affected users were notified directly. Be careful with look-alike messages; open your provider dashboards by typing the address yourself rather than clicking links.
  2. Revoke the old keys at the source. Sign in to each provider’s developer console (OpenAI, Anthropic, Google) and delete any key you ever saved in OpenCode Console. Deleting it inside OpenCode alone isn’t enough.
  3. Create new keys and update your apps. Swap the new keys into every tool or script that used the old ones.
  4. Review recent usage and billing for activity you don’t recognize, and note dates and amounts.
  5. Ask for a refund. OpenCode says refunds are being processed; if charges remain, contact the provider’s support team with your usage details.
  6. Set spending limits and alerts. Most AI platforms let you cap monthly spend or use prepaid credit. A low limit turns a future leak into an annoyance instead of a large bill.
  7. Use separate keys per tool. One key per app makes it easy to revoke just the leaked one and spot which service was compromised.

AI tools increasingly ask for broad access to your accounts and data. For related advice, see our guides to keeping ChatGPT’s Chrome tab control in check and avoiding fake AI app downloads.

Who is affected, and who isn’t

Affected: the 1.4% of OpenCode Console users who had connected external AI providers and received OpenCode’s breach email. Anyone who stored provider keys in Console should still rotate them as a precaution.

Not affected: people who use OpenCode’s open-source app or command-line tool with keys kept on their own machine, and everyday ChatGPT, Claude or Gemini app users who have never created an API key. Regular chat subscriptions aren’t billed through API keys.

FAQ

My provider already blocked my key. Do I still need to do anything?

Yes. Confirm the old key is gone, create a new one, update your tools, and check your bill for charges made before the block.

Is it safe to keep using OpenCode?

OpenCode says the open-source tool wasn’t involved. If you use Console, wait for the company’s full explanation before storing new keys there, and keep spending caps in place.

How did the attackers get in?

OpenCode hasn’t said yet. It has only described the target as a legacy system it was shutting down.

Sources

About the author

Oscar Leiva

Oscar edits Knowloft’s guides from San Salvador, El Salvador, as part of Edén Studio, a creative and software studio. Each guide is built from official data and current local prices, cites its sources and is updated when costs or rules change. Read our editorial standards.

Leave a Reply

More guides

Discover more from Knowloft

Subscribe now to keep reading and get access to the full archive.

Continue reading