Monday, 19 October 2026

OpenCode breach: why you should revoke your AI API keys today

A hacked OpenCode system may have leaked OpenAI, Anthropic and Google keys, and some users already report surprise bills. Here's who's affected and how to lock things down.

Laptop with code on desk at night

The short version

  • An intruder reached an old OpenCode system on October 16, possibly exposing AI provider keys saved in OpenCode Console.
  • OpenCode says 1.4% of Console users were affected and has emailed all of them.
  • Some users report unauthorized charges, including one claim of $1,700 in losses.
  • Deleting a key from Console doesn't revoke it, so affected users must revoke and replace keys with each provider.
Quick read · 1 min

OpenCode, a popular open-source AI coding tool, says a hacker reached an old company system on October 16 and may have exposed OpenAI, Anthropic and Google keys saved in its hosted OpenCode Console service. About 1.4% of Console users were affected, and all were emailed on October 17.

Some users report charges they didn't make, from a few hundred dollars up to $1,700. Keys stored in OpenCode's desktop and command-line apps stay on users' own machines and weren't involved.

  • Deleting a key in Console doesn't cancel it: revoke it with the provider.
  • Check your billing back to October 16 and set spending limits.
  • Use a separate key for each tool to limit damage.

One developer puts their losses at $1,700. Another reported $400 of Anthropic usage they never ran. The common thread is OpenCode, a popular open-source AI coding tool, which says a hacker broke into one of its older systems and may have exposed the OpenAI, Anthropic and Google keys some users had stored there.

If you build anything with AI, this OpenCode breach is a sharp reminder of how much an API key is worth. An API key is a long password that lets software use an AI service on your account, and your account gets the bill. Anyone holding a copy can keep spending your money until the key is cancelled. Even if you’ve never touched OpenCode, the steps below are worth five minutes of your time.

01

What happened in the OpenCode breach

OpenCode says an intruder reached a legacy system it was already in the process of shutting down on the night of October 16. The exposed data sat in OpenCode Console, the company’s optional hosted service. Console lets a team save one OpenAI, Anthropic or Google key in a shared workspace so that members can use those AI models without ever seeing the key itself.

The company emailed affected users on the morning of October 17 with the subject line “Action Required: Potential provider key breach.” OpenCode says 1.4% of Console users were affected, all of them people who had linked an outside AI provider. If you didn’t get that email, OpenCode says you weren’t affected.

OpenCode described the incident as “related to a large-scale distillation attack” and said it is working with Anthropic, OpenAI and Google to fix it. It hasn’t said how many people 1.4% represents, how the old system was reached, or when the unauthorized access started.

Checking online bill on laptop
02

Who is and isn’t at risk

This is the most important distinction. The breach involves keys pasted into OpenCode Console, the web service, not the OpenCode app most developers run on their own computers.

  • Possibly exposed: provider keys you saved in an OpenCode Console workspace.
  • Not affected, according to OpenCode: keys added in the OpenCode command-line or desktop apps, which are stored locally on your own machine. Co-founder Dax Raad stressed that those keys never reach the company.

OpenCode’s own wording is that keys “may have been exposed.” It hasn’t confirmed that any key was copied or used. But users are reporting charges they didn’t make: one said their OpenAI key was used for $281 and their Anthropic key for $168, another put their losses at $1,700, and one Reddit user said Google usage reached about €200 before the project was suspended for abuse.

03

What a distillation attack has to do with your bill

In AI, distillation normally means training a smaller model on a bigger model’s answers. The term is now also used for something shadier: rival labs quietly pulling huge numbers of answers out of a top AI model, through other people’s paid accounts, to train their own competing model. Anthropic has said these campaigns rely on networks of fake accounts built with stolen credit cards, login details and harvested API keys.

That would explain why the keys are valuable. A stolen key gives an attacker free, untraceable access to a top model, and the victim pays. It also explains why OpenCode is working with all three AI providers. Anthropic says it has already revoked Claude keys it believes were affected, while still advising anyone who saved a key in OpenCode to create a new one.

The attack isn’t over. On October 18, Raad said attackers had been hammering the company’s systems non-stop for two days, and added that his team ran into AI safety filters refusing to help while they investigated.

04

What to do now if you use OpenCode, or any AI API key

Here’s the detail many people miss: deleting a key from OpenCode Console does not cancel it. And a Console budget can’t cap misuse, because a thief using your key goes straight to the provider. You have to act at the provider.

  1. Revoke the key at the source. Log in to your OpenAI, Anthropic or Google dashboard, delete the old key and create a new one.
  2. Update everything that used it. Swap the new key into every app, script and tool, or they’ll stop working.
  3. Check your usage and billing. Look for requests you didn’t make, going back to at least October 16. If you find any, contact the provider’s support with dates and amounts.
  4. Set a spending limit or alert. AI providers generally let you cap spending or get alerts, so a stolen key can only do limited damage.
  5. Use one key per tool. Separate keys make misuse easier to spot and quicker to shut off without breaking everything else.
05

The bigger lesson for “bring your own key” AI tools

OpenCode lets developers plug in keys from more than 75 AI providers and has grown fast, reportedly passing 150,000 stars on GitHub. That convenience has a cost: any service that stores several of your keys becomes a single place where a hacker can grab them all at once. It also isn’t OpenCode’s first security scare this year. A separate, critical flaw in older versions of the app was patched earlier in 2026. Treat any AI key like a credit card number: store as few copies as possible and set limits on what it can spend.

06

Quick answers

How do I know if the OpenCode breach affected me?

OpenCode emailed every affected user on October 17. If you didn’t get that email, the company says you weren’t affected.

Does deleting my key from OpenCode Console protect me?

No. You need to revoke the key in your OpenAI, Anthropic or Google account, because deleting it in Console doesn’t cancel it.

Is the OpenCode app on my computer safe?

OpenCode says keys added in its command-line and desktop apps stay on your machine and weren’t part of this breach.

You're reading the quick version.