OpenCode, the open-source AI coding agent a lot of developers have been picking over Claude Code and Cursor, said on Saturday that attackers broke into an older part of its system overnight. The breach hit 1.4% of users of OpenCode Console, its online platform, where some people keep the API keys they use to call AI providers. OpenCode says it emailed everyone affected, and if you didn't get an email, you weren't hit.
The damage showed up fast. Developers posted on Reddit and X about OpenAI, Anthropic and Google spend alerts firing overnight, with charges in the hundreds of dollars on single accounts and a few above $1,000. Anthropic and Google blocked keys they believed were exposed, OpenAI worked with OpenCode to restore access and refund credits used in the attack, and OpenCode says refunds for unauthorized charges are underway. Co-founder Dax Raad stressed that the open-source app and CLI were not affected: "those keys never come to us."
OpenCode called it a "large-scale distillation attack" (using stolen access to pull huge volumes of model output to train another model), though some sceptics say that framing is unproven and this was just a breach. Raad also said the team spent 48 hours fending off attacks, and the AI models they leaned on for analysis started refusing once the malicious code tripped safety filters. Things improved after OpenAI gave them access to its Daybreak Blue program for vetted defensive security work. OpenCode hasn't said how attackers got in or how keys were stored, and says the incident is still ongoing.
My take
The headline lesson here isn't about OpenCode specifically. It's that every place you paste a provider API key is a place that key can leak from. The CLI users were fine because their keys stayed on their machines. The people who got burned had stored keys in a hosted dashboard. That's a convenience trade-off a lot of us make without thinking.
If you were affected, do what OpenCode says: revoke and replace the keys directly with each provider, not just through OpenCode. If you weren't, my suggestion is still to spend ten minutes on this today. Use a separate key per tool so you can kill one without breaking everything else. And set hard spending limits, not just alerts. Alerts tell you about the fire; limits stop it. I love automated reports (my own servers email me daily), but an email at 2am doesn't help if you're asleep.
This matters even more for builders paying in dollars from places like Nigeria. A surprise $1,000 bill on a local card is not a small inconvenience, and refunds through a card issuer can be slow and painful. Refunds are promised here, which is good, but I wouldn't rely on that next time with a different tool.
On the refusal problem: I think it's a real issue. Hugging Face hit the same wall in July. Guardrails that can't tell a defender from an attacker push small teams toward less restricted models. But I'm not convinced it's the main story for most readers. Until OpenCode explains how an "older system" still held live keys, I'd treat any hosted key storage, from any vendor, as something to avoid unless you really need it.
Sources
Drafted with AI assistance from the sources above, and reviewed before publishing.
Comments
What do you think? Drop your thoughts below.
Loading comments…