OpenCode Breach: Saved OpenAI, Anthropic Keys May Be Exposed

OpenCode breach key facts: saved OpenAI and Anthropic API keys exposed for Console users

OpenCode, one of the most popular open-source AI coding agents, says a security breach may have exposed OpenAI, Anthropic and other AI provider keys that some users had saved in its cloud Console.
In a post on X on Saturday, October 17, the company said the breach happened "last night," was related to what it called a large-scale distillation attack, and affected 1.4% of OpenCode Console users. OpenCode says it emailed every affected user on Saturday morning, and that anyone who did not get that email was not impacted. The incident is still ongoing, and the company says it is working with Anthropic, OpenAI and Google to fix it.

What happened

The first warning signs came from users, not the company. At about 9:36 a.m. Eastern on Saturday, developer Colin Parsons asked OpenCode on X whether it had been hacked. He said his OpenAI key had run up $281 in usage and his Anthropic key $168, starting at 2 a.m. Eastern, and that both keys were only ever used inside OpenCode. Within the hour, other users began posting the text of a notification email. Developer Carlos Miranda shared it on X: "We identified unauthorized access to a legacy system that we were in the process of decommissioning." The email went on to warn that third-party provider keys, such as OpenAI and Anthropic keys, saved in a user's workspace may have been exposed.

By late morning, security researcher Matt Johansen posted that the hack was confirmed and that OpenCode was telling customers to revoke their keys. OpenCode's own public statement followed at about 1:56 p.m. Eastern. About 12 minutes later the company edited it to add that only a subset of users who had connected external providers were affected. Later that afternoon, OpenCode co-founder Dax Raad wrote that his personal accounts were now being attacked too, calling it a "whole new world with ai powered hacking."

Advertisement

Key details

  • Who was affected: 1.4% of OpenCode Console users, according to the company. That is the subset who had saved keys for outside AI providers in a Console workspace. OpenCode has not said how many accounts that is.
  • What may be exposed: third-party provider keys, with OpenAI and Anthropic named as examples in the email. OfficeChai and Crypto Briefing also list Google keys.
  • How it happened: unauthorized access to a legacy system that OpenCode was already shutting down, according to the email. The company has not named the system or explained how the attackers got in.
  • When: the night of Friday, October 16, into Saturday, US time. Affected users were notified by email on Saturday morning.
  • Reported damage: users on X have described unexpected charges ranging from tens to hundreds of dollars. These are individual reports; OpenCode has not confirmed any figures.
  • What else the email said: according to Startup Fortune, it said the company could not confirm whether exposed keys had been misused and had found no evidence to date that other data leaked.
  • Who is helping: Anthropic, OpenAI and Google, per OpenCode's statement.

What does "distillation attack" mean here?

In AI, distillation usually means training a smaller model on the answers of a bigger one. AI labs have started using the term for something less friendly: running huge numbers of queries against a frontier model, often through someone else's account, to harvest its outputs and train a rival. We covered one example when OpenAI said it disrupted Moonshot-linked reasoning theft. OpenCode has not explained exactly how the term applies to its breach. OfficeChai and Crypto Briefing both suggest the stolen keys may have been used to pull large volumes of model output while the victims paid the bill, but neither cites confirmation from the company.

Why it matters

  • OpenCode is widely used. Its website says the project has more than 208,000 GitHub stars and over 16 million developers a month, and that it connects to 75+ model providers. Those are the company's own figures, and only users of the hosted Console were in scope.
  • One tool, many keys. "Bring your own key" tools are convenient because one app can talk to OpenAI, Anthropic, Google and others. The flip side is that a single breach can expose several paid accounts at once.
  • AI keys are money. Model APIs bill by usage, so a leaked key can start running up charges within hours, which matches what users described overnight.
  • It isn't OpenCode's first security issue. In January, the US National Vulnerability Database published CVE-2026-22812: versions before 1.0.216 started an unauthenticated local server that could let a website run shell commands on a user's machine. That flaw was fixed, and nothing so far links it to this breach.
  • AI agents and security keep colliding. This week OpenAI also disclosed that one of its own models spent test crypto from a wallet it didn't own, a reminder of how much access these tools now get.

What's next

If you have ever saved an AI provider key in an OpenCode Console workspace, these steps are sensible whether or not you got the email:

  1. Check your inbox, including spam, for the notice from OpenCode.
  2. Revoke the key directly in your OpenAI, Anthropic or Google dashboard rather than through links in any email, as Startup Fortune advises.
  3. Create a new key and update every app, script and CI job that used the old one.
  4. Review usage and billing from October 16 onward, and set a spending limit if your provider supports one.

Big questions remain open. OpenCode has not said how the attackers reached the legacy system, how many accounts the 1.4% represents, how long the keys were exposed, or how unauthorized charges will be handled. The company says the incident is ongoing and that it cannot share more details yet. OfficeChai reports that the company has promised further updates as its investigation continues.

FAQ

Was OpenCode hacked?

Yes. OpenCode said on October 17 that it had a security breach the night before, related to a large-scale distillation attack, affecting 1.4% of OpenCode Console users. The incident was still ongoing when it posted.

Do I need to rotate my API keys if I use OpenCode?

OpenCode says only users who received its email were impacted, and that they were a subset who had external providers saved in the Console. If you run OpenCode locally and never saved a provider key in a Console workspace, you don't fit that description. If you did save keys there, revoking and replacing them is a quick precaution.

What is a distillation attack?

It is a term AI labs use for mass-querying a powerful model, often through someone else's paid access, to collect its answers and train a competing model. OpenCode used the term for this breach but has not said exactly what the attackers did with the exposed keys.

Sources

Comments

Popular posts from this blog

Meta Muse Shared Chats Exposed: What to Do If You Shared One

OpenAI Agent Hacked an Australian Government Site: What We Know

Suncatcher TPU Satellite: How to Track It and What Happens Next