OpenCode Console breach exposes stored AI API keys
Attackers broke into an older OpenCode system and reached API keys some Console users had saved, triggering unauthorized charges on OpenAI, Anthropic and Google accounts; the open-source app and CLI were not affected.

OpenCode, the open-source coding agent that many developers use as an alternative to Claude Code and Cursor, has confirmed a security breach. Attackers got into an older system overnight and affected 1.4% of users of OpenCode Console, the company's online platform, where some people keep the API keys they use to call AI models.
What happened
OpenCode described the incident on X as a breach linked to a large-scale "distillation attack" and said it emailed every affected user the next morning. Anyone who did not get an email was not impacted. The company has not said how the attackers got in, how the keys were stored or how far the misuse went, and some skeptics argue the distillation framing is unproven and that this was a plain breach.
Developers quickly noticed. Overnight, people posted spending alerts from OpenAI, Anthropic and Google on Reddit and X. Some reported charges in the hundreds of dollars on a single account, and a few said totals passed $1,000.
The providers moved fast. Anthropic and Google blocked the keys they believed were exposed, while OpenAI said it worked with OpenCode to restore access and refund credits used in the attack. OpenCode says refunds for unauthorized charges are underway and has told affected users to revoke and replace their keys directly with each provider.
The app itself was not hit
Co-founder Dax Raad stressed that only keys saved in Console workspaces were exposed. The open-source app and command-line tool never send keys to OpenCode, so they were not affected.
Defenders hit the guardrails
The response exposed a second problem. Raad said attackers kept trying to break in for 48 hours, so the team ran AI defensive agents around the clock. The AI models it used for analysis helped at first, then began refusing once the malicious code they were examining tripped safety filters. Access to OpenAI's Daybreak Blue program, which gives vetted defenders models that are less likely to refuse security work, improved the investigation. Hugging Face reported a similar wall earlier this year.
Why it matters for builders
Treat every stored API key as a liability. Use per-project keys with tight spending limits and alerts, rotate them regularly and avoid saving them in third-party dashboards unless you need to. Tools that run locally and talk to providers directly, like the OpenCode CLI, keep keys on your own machine. And if you run security work with AI, plan for refusals in the middle of an incident before you need the help.
Source: TechCrunch. This article is PickAI’s own summary and analysis based on the original reporting, prepared with AI assistance under our editorial policy.