OpenCode, the open-source AI coding agent, disclosed a security breach on October 17, 2026 that exposed API keys users had stored in its hosted OpenCode Console. Attackers then used the stolen keys in what the company called a “large-scale distillation attack,” running up unauthorized charges on victims’ accounts with AI providers.
The company announced the incident in a post on its official X account and in an email to affected users titled “Action Required: Potential provider key breach.”
What Happened
According to OpenCode, attackers compromised a legacy system connected to the Console, the hosted platform where users store API keys for external providers such as OpenAI, Anthropic and Google. About 1.4% of Console users were affected, limited to those who had linked external provider keys.
Crucially, the OpenCode breach did not touch the open-source app or CLI: those keep keys on the user’s own machine, so “those keys never come to us,” co-founder Dax Raad explained.
“We had a security breach last night related to a large-scale distillation attack that impacted 1.4% of OpenCode Console users… We have notified them all this morning via email,” the company said in its disclosure.

Real Money Lost
Affected users reported unauthorized charges ranging from a few hundred dollars to more than $1,000, with BleepingComputer documenting one case above $1,700. The providers moved quickly: per TechCrunch’s reporting, Anthropic and Google blocked keys suspected of being leaked, while OpenAI restored access and refunded credits. OpenCode says it is refunding unauthorized fees as well.
One caveat: in a follow-up update, OpenCode said it “cannot confirm whether the keys were used without authorization,” a line that sits uneasily next to the user-reported bills and the providers’ responses. The incident remains under investigation, and the full mechanism of the intrusion has not been explained.
What Users Should Do
OpenCode’s guidance is blunt: revoke and rotate keys directly at each provider. Simply deleting a key from the Console is not enough, since a stolen key remains valid at the provider until revoked there. Users should also review usage dashboards for anomalies and set spend limits on API accounts.

Why It Matters
The incident is a reminder of a structural risk in the AI coding boom: developer tools that hold the keys to paid model APIs become high-value targets, and a single leaked key can be converted into real money within minutes. For users of any hosted AI tool, the lesson is the same: treat API keys like passwords, rotate them, and cap spending before an attacker does it for you.

