On 17 October 2026 OpenCode, the open source AI coding agent, told some users of its hosted OpenCode Console that third-party AI provider keys stored in their workspaces may have been exposed. According to The Hacker News, an intruder reached a legacy system the night before, a system OpenCode says it was in the process of decommissioning. The breach affected 1.4% of Console users, all of whom had linked an external provider such as OpenAI, Anthropic or Google. Within hours, developers reported unauthorised AI usage on their own provider accounts, from a few hundred dollars to more than $1,700, and Google suspended some projects. OpenCode linked the breach to a large-scale distillation attack and said it was ongoing. It has not said how the legacy system was reached or how the keys were stored. Keys held locally by the OpenCode CLI and desktop apps were not affected, its co-founder said.
Key takeaways
- OpenCode says an intruder accessed a legacy system and exposed stored provider keys belonging to 1.4% of OpenCode Console users, all with OpenAI, Anthropic or Google keys linked.
- The notification email gave 00:30 UTC on 17 October 2026 as the earliest possible exposure, according to BleepingComputer; OpenCode has not said when access began or how many keys were taken.
- Users reported unauthorised charges of several hundred dollars and, in one case, more than $1,700. These are users' own claims. Anthropic and Google blocked the keys they believed were exposed, and OpenAI said it was refunding affected API customers, TechCrunch reports.
- OpenCode called it "a large-scale distillation attack" but has not explained the link, and some observers think the label overstates a straightforward breach.
- The identity lesson: a service that holds customers' LLM API keys becomes a key vault for every provider at once, and deleting a key there does not revoke it at the provider.
At a glance
| Organisation | OpenCode (OpenCode Console hosted service); Console users with linked OpenAI, Anthropic or Google keys |
|---|---|
| When | Intrusion on the night of 16 October 2026; users notified and breach announced on 17 October 2026 |
| Attacker | Unknown. OpenCode links the incident to a large-scale distillation attack but has not named anyone |
| Entry point | Unauthorised access to a legacy system OpenCode was decommissioning; method not disclosed |
| Identities abused | Customers' stored third-party LLM provider API keys (OpenAI, Anthropic, Google) |
| Impact | 1.4% of Console users affected; user-reported unauthorised AI charges from hundreds of dollars to over $1,700; some Google Cloud projects suspended; exposed keys blocked by Anthropic and Google |
| Category | NHI; LLM / AI platform. Incident class: confirmed NHI breach (stolen stored API keys used for unauthorised AI usage) |
What happened
OpenCode is an open source, model-agnostic AI coding agent that competes with tools such as Claude Code and Cursor. Its command line and desktop apps keep provider keys locally. OpenCode Console is an optional hosted service: as The Hacker News explains, a workspace stores its own OpenAI, Anthropic or Google API key in Console, and Console uses that key to call the provider so team members can use the models without seeing the key. That design makes Console a central holder of many customers' provider credentials.
On the morning of 17 October 2026, OpenCode emailed affected users under the subject "Action Required: Potential provider key breach", The Hacker News reports. Notebookcheck says the notice told users that keys may have been exposed after someone accessed a legacy system. According to BleepingComputer, the email gave 00:30 UTC on 17 October as the earliest possible exposure. OpenCode said the breach affected 1.4% of Console users, all with external providers linked, and co-founder Dax Raad told users: "If you did not get an email, you were not impacted." Raad also said the keys involved were limited to Console. Keys used by the CLI and desktop apps, he wrote, are stored locally and "never come to us", as quoted by The Hacker News.
Developers were already seeing the effects. Notebookcheck cites a Reddit user who reported $400 of unauthorised Anthropic usage and another who reported about €200 of Google usage. The Hacker News, citing Dealroom, reports one user with $281 on OpenAI and $168 on Anthropic, and another reporting $1,700. BleepingComputer says Google suspended some projects after detecting "abusive activity consistent with hijacked resources". TechCrunch reports that Anthropic and Google blocked the keys they believed were exposed and that OpenAI worked with OpenCode to restore access and refund API customers. OpenCode said reimbursement was possible and that refunds were under way.
OpenCode described the incident to TechCrunch as "a large-scale distillation attack that impacted 1.4% of OpenCode Console users" and said it was working with Anthropic, OpenAI and Google. Distillation means training a model on another model's outputs; it becomes an attack when those outputs are harvested at scale without authorisation, and stolen keys are one way to fund that. OpenCode has not explained how the breach and the distillation activity connect, and TechCrunch notes that some sceptics saw the label as overstated. Raad said attackers had tried to break into OpenCode's systems continuously for 48 hours. He also said the AI models the team used for defensive analysis started refusing requests when malicious code triggered their safety filters, and that the situation improved after OpenCode gained access to OpenAI's Daybreak programme for defensive security work.
Timeline
| Date | Event |
|---|---|
| 16 October 2026 | An intruder accesses an OpenCode legacy system overnight, according to The Hacker News. |
| 17 October 2026 | 00:30 UTC: earliest possible exposure of stored keys, according to the notification email cited by BleepingComputer. |
| 17 October 2026 | OpenCode posts on X that the breach is linked to a large-scale distillation attack and is ongoing; The Hacker News says affected users were emailed that morning, BleepingComputer says the following day. |
| 17 October 2026 | OpenCode says it is working with Anthropic, OpenAI and Google. |
| 17 October 2026 | Users report unauthorised OpenAI, Anthropic and Google charges; Notebookcheck reports the breach. |
| 18 October 2026 | Dax Raad says attackers have been trying to breach OpenCode's systems for 48 hours and defences are being hardened. |
| 19 October 2026 | BleepingComputer, The Hacker News and TechCrunch report the breach; Anthropic and Google have blocked exposed keys and OpenAI is refunding API customers. |
How it happened: the identity attack path
- Keys centralised in a hosted service. Console stored each workspace's OpenAI, Anthropic or Google API key so it could call providers on users' behalf.
- Legacy system left reachable. A legacy system that OpenCode was decommissioning was still accessible and, it appears, still able to reach those stored keys.
- Intruder gains access. An unauthorised party accessed that system on the night of 16 October. OpenCode has not disclosed how.
- Provider keys exposed. Keys for 1.4% of Console users, those with linked providers, were exposed. OpenCode has not said whether they were stored encrypted.
- Keys used directly at providers. Users then saw unauthorised usage billed to their own accounts. Because the keys worked at the provider, controls inside Console, such as its budgets, did not cap that usage.
Impact
- Confirmed: OpenCode confirmed that stored provider keys for 1.4% of Console users may have been exposed. It has not said how many users or keys that represents.
- Reported by users: Unauthorised AI charges from a few hundred dollars to more than $1,700 per user, and Google Cloud project suspensions. These figures come from users and have not been independently verified.
- Provider response: Anthropic and Google blocked keys they believed were exposed, and OpenAI said it was refunding API customers for credits used in the attack, according to TechCrunch.
- Not affected: Keys used by the OpenCode CLI and desktop apps, which Raad says are stored locally. BleepingComputer reports OpenCode saying that no other data appears to have been exposed.
- Unknown: When access began, how the legacy system was reached, how keys were stored and the full scale of misuse, including how much model output may have been harvested for distillation.
What this means for NHI and AI agent security
LLM provider API keys are non-human identities with a direct price tag. Anyone holding one can spend the owner's money and, as the distillation claim suggests, extract a model's capabilities at the owner's expense. OpenCode Console did what many AI tools do: it took customers' keys so a team could share access without seeing them. That is a sensible usability choice, but it turns the tool into a multi-tenant vault for long-lived keys across several providers, and a single legacy component became the weak point. Decommissioning work is a known risk area, because old systems often keep their access to secrets long after anyone is watching them.
The incident also shows the limits of revocation by the middleman. As The Hacker News points out, deleting a key from Console does not revoke it at the provider, and Console budgets do not cap usage made outside its gateway. Only the provider can stop a stolen key. Our LLMjacking Guide covers spend limits, per-tool keys and usage monitoring, and our API Key Management Guide covers storage and rotation. The same month, the LiteLLM supply chain attack went after provider keys stored in AI gateway databases,, and our Railway breach page covers another platform that held customers' secrets. Platforms that hold other people's AI keys are now a target class of their own.
Recommendations
- Revoke and replace exposed keys at the provider. Affected users should revoke keys in the OpenAI, Anthropic or Google dashboard, issue new ones and update every application that used them. See our LLMjacking Guide.
- Review provider usage from 16 October onwards. Check billing and request logs for unfamiliar models, volumes or regions, and ask the provider about refunds for fraudulent use.
- Set hard spend limits and alerts on every AI key. Budget controls in a third-party tool do not apply when a stolen key is used directly, so set limits with the provider itself.
- Use a separate, least-privilege key for each tool. One key per tool and project limits the blast radius and makes misuse easy to trace. See our API Key Management Guide.
- Cut secret access when retiring systems. Before decommissioning a component, remove its access to key stores and databases first, then switch it off. See our Secrets Management Guide.
- Ask vendors how they hold your AI keys. If a tool stores provider keys for you, ask how they are encrypted, which systems can read them and how you will be told of a breach. Prefer tools that keep keys local or use short-lived delegated credentials. See our AI Coding Agents Security Guide.
Frequently asked questions
Was the OpenCode CLI affected by the October 2026 breach?
No, according to OpenCode co-founder Dax Raad. The breach involved keys stored in OpenCode Console, the optional hosted service. Keys used by the open source CLI and desktop apps are stored locally on the user's machine and, Raad said, never reach OpenCode.
How do I know if my OpenCode Console keys were exposed?
OpenCode emailed affected users (on 17 October 2026 according to The Hacker News; BleepingComputer places the emails a day later) and said that users who did not receive an email were not affected. Even so, anyone who linked OpenAI, Anthropic or Google keys to Console should check provider usage for unexpected activity and consider rotating the keys.
What is a distillation attack and how does it relate to stolen API keys?
Distillation trains one AI model on the outputs of another. It becomes an attack when someone harvests outputs at scale without authorisation, often through stolen or fake accounts so the cost and the rate limits fall on someone else. OpenCode linked its breach to such an attack but has not explained how.
Related NHI Mgmt Group resources
LiteLLM Supply Chain Attack 2026 · Railway Breach 2026 · LLMjacking Campaign 2024 to 2026 · LLMjacking Guide · API Key Management Guide
How NHI Mgmt Group can help
Many teams have no inventory of which tools hold their LLM provider keys, or what those keys can spend. We help organisations map AI keys across tools and platforms, set ownership, limits and rotation, and prepare a response plan for when a vendor holding those keys is breached. See our NHI and AI agent security training.
References
- Notebookcheck: OpenCode confirms breach as users report AI charges they never authorised (17 October 2026)
- The Hacker News: OpenCode Console Breach May Have Exposed OpenAI, Anthropic, and Google API Keys (19 October 2026)
- BleepingComputer: OpenCode hack exposes API keys amid AI distillation attacks (19 October 2026)
- TechCrunch: Hackers hit AI coding tool OpenCode, running up charges on users' AI accounts (19 October 2026)