The OpenCode breach may have exposed third-party API keys stored in some users’ Console workspaces. If you linked OpenAI, Anthropic, or Google keys to OpenCode, revoke them and issue new ones today. OpenCode says the problem affects 1.4% of Console users.
Quick facts, as reported on October 17, 2026:
- OpenCode confirmed a breach overnight on October 16-17 and tied it to what it calls a “large scale distillation attack.”
- It affects about 1.4% of Console users, specifically those with external providers linked.
- Stored OpenAI, Anthropic, and Google API keys may have been exposed.
- OpenCode says it emailed affected users; no email means you weren’t hit.
- The incident is described as ongoing, so details may change.
The short version: a leaked API key is basically a blank check on your billing account, so rotating is cheap insurance.
What the OpenCode breach actually exposed
OpenCode is an open-source terminal coding agent. Its Console lets you save keys for outside model providers so the agent can call them for you. That convenience is what’s at risk here.
According to Notebookcheck, someone got into a legacy system the company was decommissioning. OpenCode says it is working with Anthropic, OpenAI, and Google on the response.
No one has published a post-mortem yet. We don’t know the exact attack window, who did it, or whether anything besides keys was taken. ExplainX notes that no source says the open-source agent itself was compromised.
Are you affected? A two-minute check
Start with your inbox, then your provider dashboards. Work through these in order:
- Search your email, including spam, for a message from OpenCode about the incident.
- Open the OpenCode Console and see whether any OpenAI, Anthropic, or Google providers are linked.
- Check each provider’s usage page for traffic you don’t recognize since October 16.
Even if you got no email, rotating is smart if you ever linked a provider. It takes minutes and removes any doubt.
What users are reporting so far
Some people say they’ve already seen charges. Notebookcheck cites a Reddit user who reported about $400 in unauthorized Anthropic charges. Another reported roughly €200 in Google usage and a project suspended for “excessive abuse.”
These are unverified user reports, not confirmed numbers from OpenCode or the providers. Still, they show why speed matters. Others said their OpenCode service keys expired and social login failed with “Unable to start social login.”
Why a stolen AI key costs more than you’d think
Unlike a password, an API key usually has no second step. Anyone holding it can send requests that bill your account, and heavy models cost real money per call. Attackers also tend to run keys hard and fast before the owner notices.
Coding agents make this worse because they often run long loops. A single key used by a script can rack up hundreds of dollars overnight. That’s why a spending cap matters as much as the rotation itself.
How to rotate your OpenAI, Anthropic, and Google keys
The steps are the same everywhere: create a new key, switch your tools over, then delete the old one. The table shows where to look at each provider.
| Provider | Where to rotate the key | What to check afterward |
|---|---|---|
| OpenAI | API keys page in the OpenAI platform dashboard | Usage and billing pages; look for spikes since October 16 |
| Anthropic | API keys section in the Anthropic Console | Usage and cost reports; check for models you never call |
| API credentials in your Google AI Studio or Google Cloud project | Project billing and quota graphs; note any abuse warnings |
Two habits help beyond this incident. Set a hard monthly spending cap on every key, and keep keys in your own secret manager instead of in a hosted dashboard. Also update every copy of the old key, including CI secrets, .env files, and shell profiles, or your tools will quietly break.
If you also run AI agents with broad access, our piece on NXDirection and prompt injection defense covers a different way those tools can leak data. And if the key theft worries you, see how fake installers target AI users in our fake Claude installer scam guide.
Frequently Asked Questions
Did the OpenCode breach leak my OpenAI or Anthropic key?
Only if you linked those providers in the OpenCode Console. OpenCode says it emailed every affected user, and people who got no email were not impacted. Rotate anyway if you’re unsure.
Is the OpenCode terminal app itself unsafe to use?
No source reports that the open-source agent was compromised. The breach hit a legacy Console system. Keeping keys in your own environment variables instead of the Console reduces your exposure.
What should I do if I see unexpected charges?
Revoke the key first, then contact the provider’s billing support with the dates. No provider has published a refund policy for this incident yet, so ask directly and keep screenshots.
What is a distillation attack?
It’s when someone uses a model’s outputs, often at huge scale, to train a cheaper copy. OpenCode uses the term for this incident, but it hasn’t explained how that led to key theft.
Our take
Treat this as a free fire drill. Rotate the keys, add spending caps, and stop parking provider credentials in third-party dashboards when an environment variable will do. Waiting for a full post-mortem only makes sense if nobody is already using your key, and you can’t know that from here.


Leave a Reply