October 19, 2026

One Leaked AI Key Can Run Up Your Bill. The OpenCode Breach Is a Good Reason to Check Yours

Late on October 16, someone got into an old system at OpenCode, the company behind a popular open-source AI coding agent. The next morning, OpenCode emailed a small group of users with a simple message: the AI provider keys you saved with us may have been exposed. Revoke them and create new ones.

Only 1.4% of users of its hosted Console service were affected. But the lesson applies to almost any business that now uses AI tools, so I think it is worth a few minutes.

I use AI tools to build software myself, so this is the kind of story that sends me straight to check my own setup

What actually happened

OpenCode has two parts. The coding tool runs on your own computer, and keys you add there stay on that computer. Console is an optional hosted service where a team saves its own OpenAI, Anthropic or Google key, so members can use the models without seeing the key.

The breach involved Console only. OpenCode says the intruder reached a legacy system it was already shutting down. Only Console users with an outside provider linked were affected, and anyone who did not get an email was not.

A lot is still unknown. OpenCode linked the breach to a “large scale distillation attack”, which means collecting a model’s answers to train another model. It has not said how the attacker got in, how many keys were involved, or whether any key was actually used. It also called the incident ongoing.

Why an AI key is closer to a credit card than a password

An AI provider key works like a pass. Whoever holds a copy can make paid requests on your account until you revoke it at the provider.

That has two practical effects. Deleting the key from the tool that leaked it does nothing, because the copy still works. And spending limits inside that tool do not help, because the attacker is not going through it. Only the provider sees the bill.

Some users say they have already been charged for usage they did not make. One reported $281 on OpenAI and $168 on Anthropic. Another reported $400 on an Anthropic account. These are users’ own claims, not confirmed by OpenCode. Still, they show how quickly a leaked key turns into real money.

What this means for small businesses and solo builders

Not long ago, most small companies had no AI keys at all. Now one person might have keys in a coding agent, an automation tool, a website chatbot and a few scripts. Each of those is a place a key can leak from.

The bill is not the only risk. If one shared key is used everywhere, you cannot tell which tool leaked it, and replacing it means updating everything at once. That is a process problem more than a technology problem.

I do not think the answer is to stop using hosted AI tools. They are useful. The answer is to treat AI keys like any other financial access in the business: know where they are, limit what they can spend, and be able to replace them quickly.

What I would do this week

  • List every tool and script that holds one of your AI provider keys.
  • Give each tool its own key, so a leak is easier to trace and cheaper to fix.
  • Set a spend limit or alert in each provider’s own dashboard.
  • If a key may be exposed, revoke it at the provider first, then update every app that uses it.
  • Check provider usage regularly, not only after a warning email.

Do you know how many places your company’s AI keys live right now? I suspect many small teams would need a while to answer.

Sources

Notebookcheck: OpenCode hacked, users urged to revoke their API keys (Oct 17, 2026)

← Back to field notes