MeanCEO: Tech Startups and Startup Ideas

OpenCode Hacked: Saved OpenAI and Anthropic Keys Exposed. Rotate Yours Now

TL;DR: Was OpenCode hacked?

Yes. On 17 October 2026, OpenCode, the popular open-source AI coding agent, said it had "a security breach last night related to a large scale distillation attack" that hit 1.4% of OpenCode Console users. Those affected had saved their own OpenAI, Anthropic or Google API keys in the Console, and those keys may have been stolen. Some users saw overnight charges on their AI accounts. If you got OpenCode's email, revoke and replace your keys at each provider now and check your usage. Deleting them inside OpenCode isn't enough.
If you build with AI coding agents, your API keys are money. Anyone who has them can run up your bill, and this week thousands of developers learned that the hard way.
OpenCode is one of the most popular open-source coding agents, an alternative to Claude Code and Codex that many indie hackers use because it works with any model. Its GitHub repository has more than 215,000 stars. A breach there hits exactly the people who read mean.ceo: solo founders who connect their own AI accounts to the tools they build with.

What happened

Here is the sequence on 17 October 2026, based on posts on X and the email OpenCode sent to customers (times in UTC):
  • Overnight, 16–17 October: the breach. Developer Chris Sinco posted at 14:35 that his OpenAI, Anthropic and Google spend alerts "all fire off before going to bed".
  • Around 15:30: security commentator Matt Johansen shared OpenCode's customer email: "Confirmed. OpenCode hacked. Keys stolen."
  • 18:08: OpenCode confirmed it publicly: "We had a security breach last night related to a large scale distillation attack that impacted 1.4% of OpenCode Console users." It added: "If you did not get an email you were not impacted", and that it is "working with Anthropic, OpenAI, and Google to remediate".
  • Later that evening: co-founder Dax Raad wrote that his "personal accounts are being attacked now too".
The customer email, posted on Hacker News, says an unauthorised party accessed "a legacy system that we were in the process of decommissioning", and that "third party provider keys (eg OpenAI, Anthropic) saved in your workspace may have been exposed."
OpenCode says the incident is ongoing and it can't share more yet. As of 18 October, its status page didn't list the breach. The same week brought one more reason to check your stack, a critical PHP vulnerability that needs a same-day update on any server running WordPress or Laravel.

What is a "distillation attack"?

OpenCode hasn't explained the term. Distillation usually means collecting huge numbers of answers from a strong AI model to train a cheaper copy of it. Anthropic said in February 2026 that it had caught AI labs doing this through thousands of fake accounts.
The most likely reading, which commentators share but nobody has confirmed: the attackers wanted free access to top models at scale, and stolen customer keys gave it to them, billed to the customers. One user reported about 35 million tokens across 8,966 OpenAI requests on his account. Either way, for you the result is the same: someone else may be using your key. Keys came under attack again on 21 October, when the Railway and LiteLLM breaches put environment variables and AI credentials at risk.

Who is affected

OpenCode has two main parts. The open-source agent runs on your own computer. The Console is its hosted service, where teams can manage billing and save their own provider keys. The breach hit the Console, and only users "who had external providers linked".
If you only run the local agent with your own keys, you don't appear to be affected, but OpenCode hasn't said that explicitly. OpenCode hasn't shared how many people the 1.4% is, how the attackers got in, or whether the keys were encrypted. Claims online that keys were stored in plain text come from Reddit speculation, not from OpenCode.
What we knowWhat we don't know yet
The Console was breached overnight on 16–17 OctoberHow the attackers got in
1.4% of Console users with linked providers were affectedHow many people that is
Saved OpenAI, Anthropic and Google keys may have been exposedWhether the keys were encrypted
OpenCode is working with all three providersWhether any other data was taken
Affected users got an emailHow much money victims lost in total

What to do now

OpenCode's email tells users to "revoke and replace those keys through the relevant provider's dashboard, update any applications using them, and review recent usage for unexpected activity." In practice:
  1. Anthropic: in the Claude Console, go to Settings, then API keys, delete the old key and create a new one. Under Billing, set a spend limit.
  2. OpenAI: on the platform's API keys page, revoke the old key and create a new one. Check your project's usage and budget settings.
  3. Google (Gemini): create a new key in Google AI Studio, then disable the old one in the Google Cloud console under APIs and Services, Credentials. Google now lets you set a monthly spend cap.
  4. Check your bills. If you see usage you didn't make, contact each provider's support with the dates. Keep screenshots.
For a longer walkthrough, see Developers Digest's guide. And remember: stolen keys get abused fast. Security firm Sysdig found that a stolen AI key can cost its owner over $46,000 a day in the worst case.

The European angle

If you're an EU founder, two things matter. First, if OpenCode is your supplier and your customers' data went through it, ask OpenCode in writing what was exposed. Under the GDPR, Article 33 gives controllers 72 hours to notify their data protection authority after becoming aware of a personal data breach, unless it is unlikely to cause risk to people. An API key alone usually isn't personal data, but what was done with it could be. Second, write down what you checked and when; it's the first thing an authority or a customer will ask for. Our GDPR compliance checklist for early-stage startups covers the basics.
This is the second supply-chain scare for founders this week: on WordPress, some copies of the Rank Math PRO SEO plugin shipped with malware. Read our Rank Math PRO malware guide.

What this means for you

  1. Treat API keys like cash. Every AI tool you paste a key into is a place it can leak from. Before you connect a new tool, ask whether you really need it; our guide on how to evaluate an AI tool helps.
  2. Set hard spend limits today, even if you weren't affected. A limit turns a breach from a disaster into an annoyance. Alerts alone don't stop the spending.
  3. One key per tool. If each tool has its own key, you can kill one without breaking your whole stack, and you can see which tool leaked.
  4. Don't drop OpenCode in a panic, but watch how it handles this. Ask what happened, when it will explain, and how keys are stored now. Open-source tools can be very good; the hosted parts still need trust. For alternatives, see our AI tools for solo founders.
  5. Expect more of this. AI coding tools hold the keys to your accounts and code. Recent news, from Replit switching its default model to OpenAI's agent push in Europe, shows how fast this market moves; security often lags behind.
Are you getting customers from ChatGPT yet?

More and more traffic is coming from Perplexity, ChatGPT, Grok and other AI tools.

πŸ‘‰ Rank on ChatGPT

FAQ: the OpenCode breach

Was OpenCode hacked?

Yes. OpenCode said on 17 October 2026 that it had a security breach the night before, related to a "large scale distillation attack", affecting 1.4% of OpenCode Console users who had linked their own AI provider keys.

Which API keys were exposed?

Third-party provider keys saved in OpenCode Console workspaces, such as OpenAI and Anthropic keys. OpenCode is also working with Google, so Gemini keys may be involved.

How do I know if I'm affected?

OpenCode emailed affected users and said: "If you did not get an email you were not impacted." Still check your AI provider usage for spikes since 16 October.

Is the local OpenCode CLI affected?

The breach hit the hosted Console. Users who only run the local agent with their own keys don't appear to be affected, but OpenCode hasn't said this explicitly.

Is deleting my key in OpenCode enough?

No. A stolen copy keeps working until you revoke the key at the provider (OpenAI, Anthropic or Google). Revoke it there, create a new one, and update your apps.

What is a distillation attack?

Usually it means harvesting a strong AI model's answers at scale to train a cheaper model. OpenCode hasn't explained how it applies here; the likely link is that stolen keys gave attackers model access billed to victims.

About the Author

Violetta Bonenkamp, also known as MeanCEO, is an experienced startup founder with an impressive educational background including an MBA and four other higher education degrees. She has over 20 years of work experience across multiple countries, including 5 years as a solopreneur and serial entrepreneur. Throughout her startup experience she has applied for multiple startup grants at the EU level, in the Netherlands and Malta, and her startups received quite a few of those. She’s been living, studying and working in many countries around the globe and her extensive multicultural experience has influenced her immensely.
2026-10-18 10:18 News and Trends