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.

Security2 min readBy
OpenCode Console breach exposes stored AI API keys – PickAI illustration

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.

Enjoyed this story? Get PickAI Weekly

Get the week’s best new AI tools and news — one email a week, free. No spam, unsubscribe anytime.

Related tools on PickAI

↗

Claude Code

anthropic.com

Anthropic's agentic coding tool that works in your terminal and IDE.

Related AI news

All news →
TechCrunch

Anthropic publishes FlashProve, an open-source way to prove which AI model wrote an answer

Anthropic researchers released a spec and working code for FlashProve, a system meant to give cryptographic proof that an output came from a specific model, without revealing the model's weights. It is research in progress, with no plans to deploy it at any lab.

TechCrunch

Anthropic's IPO filing says it may soon hit its own 'AI builds AI' threshold

In a revised S-1/A, Anthropic says its internal estimates suggest it may imminently meet its Responsible Scaling Policy's definition of dramatically accelerated, AI-driven progress, though it has not labeled any current model as crossing that line.

Anthropic

Anthropic's Message Threads beta stops agents from resending the whole conversation every turn

Anthropic put message threads into public beta for the Messages API: send the full conversation once, then only new messages plus the previous response ID. It says median time to first token drops about 35% for 500K-1M-token requests.

Get the weekly AI tools drop

New tools and releases for builders, once a week. No spam, unsubscribe anytime.