Get a free audit

Field Notes / AI Security

OpenCode lost its users’ AI keys. The bills arrived before the email.

On 17 October 2026 attackers reached a half-retired OpenCode system and took the OpenAI, Anthropic and Google API keys that 1.4% of its Console users had stored there. Some victims found charges of up to $1,700 and suspended Google Cloud projects. OpenCode calls it a distillation attack. Here is why a stolen AI key is worth more than a stolen password, where your own keys sit today, and the five checks that cap the damage.

Author
Red Team Partners
Read
9 MIN READ
Filed
20 Oct 2026
A developer working remotely, the person whose AI provider key now sits in more tools than anyone has written down.

01 What happened at OpenCode

or at least 48 hours, attackers using AI agents worked on OpenCode’s systems, according to co-founder Dax Raad. They got in through a system the team was already switching off. Raad said the investigation slowed at one point because the AI models the defenders were using began refusing requests under their own safeguards. OpenCode then moved to OpenAI’s Daybreak security model, which it was approved to use that Saturday, and Raad said that stabilised the situation BleepingComputer 2026 .

WhenWhat
16 October, nightBreach of the legacy Console system, per OpenCode’s statement of the next day
17 October, 00:30 UTCEarliest possible exposure of stored provider keys, per OpenCode’s email
17 October, morningAffected users emailed: "Action Required: Potential provider key breach"
17 to 19 OctoberUsers report unauthorised charges and suspended Google Cloud projects
As of 19 OctoberNo root cause published. OpenCode says it is working with Anthropic, OpenAI and Google

Scope matters here. Raad said the breach involved "the OpenCode Console, not OpenCode itself" Infosecurity 2026 . Console is the hosted service that lets a team share access to AI models through centrally managed keys. The command-line agent on a developer’s laptop was not the entry point. Only Console users who had linked an external provider were affected, and OpenCode says everyone affected got an email OpenCode 2026 .

1.4% sounds small. OpenCode’s chief executive told a Y Combinator interview in July 2026 that the product had about 13 million monthly active users. Console is a subset of those, and OpenCode has not said how many keys left. Nobody outside the company knows the real count yet.

02 Why an attacker wants your AI key

A stolen password gets an attacker into one account. A stolen AI key gets them compute, billed to you, under your good name. Distillation shows why that is worth industrial effort.

Distillation trains a cheaper model on the answers of a stronger one. Every lab does it with its own models. Doing it to someone else’s model takes millions of queries, and the provider bans accounts that look like it. In February 2026 Anthropic said three AI labs had run over 16 million exchanges with Claude through about 24,000 fraudulent accounts, routed through proxy networks built so that a banned account was replaced instantly Anthropic 2026 . Anthropic said it was building classifiers and fingerprinting to spot the pattern.

The distillation label is OpenCode’s own. It has published no evidence tying the stolen keys to a specific campaign, and no outlet has confirmed it independently StepSecurity 2026 . The motive barely changes your exposure. Whether the key trains a rival model or mines someone’s side project, the damage lands on your bill, your provider standing and any data your account can reach.

03 Where your keys live today

OpenCode was breached through a system it was "in the process of decommissioning". That phrase describes half the findings we report. Retiring a system is the moment nobody owns it. The new platform gets the monitoring. The old one keeps its credentials, its open ports and its copy of the data until the day someone finally turns it off.

Now count where your company’s AI keys sit. In most engineering teams one OpenAI or Anthropic key rarely stays in one place:

  • Developer machines. Coding agents keep keys in local config. For OpenCode that is ~/.local/share/opencode/auth.json, and every provider listed there is a credential StepSecurity 2026 .
  • Hosted tools. Console-style services, AI gateways, observability tools and chat front ends that store a key so the team can share it. Each one is a vault you do not run.
  • Pipelines and repositories. CI secrets and, too often, the git history. GhostAction’s October wave searched commits specifically for Anthropic, OpenAI and OpenRouter keys.
  • Trials nobody cancelled. The tool someone linked for a week in spring, still holding a key with no spend limit.

Most teams share one key across all of these. Then one breach anywhere means rotating everywhere, and nobody can tell from the usage dashboard which tool sent which request.

04 Five checks for this week

If anyone in your company used OpenCode Console, start with the first item today. The rest apply whether OpenCode touched you or not, and an IT lead can finish them in a week.

This week
  • Search inboxes for "Action Required: Potential provider key breach", check developer machines for ~/.local/share/opencode/auth.json, and rotate every OpenAI, Anthropic and Google key listed there. Confirm the old keys now fail
  • Review usage and billing on every AI provider account from 16 October onwards. Look for models, volumes or hours your team does not use, and dispute what you did not send
  • Set a hard monthly spend limit and a budget alert on every AI provider account, so the next stolen key costs you a capped amount and an email, not a four-figure surprise
  • Issue one key per tool and per team, named after where it lives, so a breach means rotating one key and the usage dashboard tells you who sent what
  • List every third-party service that holds one of your AI keys, revoke the ones nobody uses, and add a step to your offboarding and decommissioning checklists that revokes keys before a system goes quiet

OpenCode did the notification right: affected users got an email within hours, with a clear subject line. The keys still worked for whoever took them until each user rotated. Your exposure depends on how many places hold your keys and what each one can spend. We can map that in 14 days. You get every location of every AI and cloud credential we can reach, what each can spend and access, and the change that closes each path. Start with your Threat Map, from $5,000. Enterprise-grade. Not enterprise-priced.

References

Sources

  1. BleepingComputer. OpenCode hack exposes API keys amid AI distillation attacks. 19 October 2026. bleepingcomputer.com
  2. Infosecurity Magazine. OpenCode Breach Could Affect OpenAI, Anthropic and Google. October 2026. infosecurity-magazine.com
  3. StepSecurity. OpenCode Security Breach: Distillation Attack Hit Console Users With Linked AI Providers. October 2026. stepsecurity.io
  4. OpenCode (@opencode). Breach statement on X. 17 October 2026. x.com
  5. Anthropic. Detecting and preventing distillation attacks. February 2026. anthropic.com