The company described the incident as a "large-scale distillation attack" on X, saying it had notified affected users by email. While OpenCode did not specify how the attack occurred, leaked API keys can enable users in countries with restricted access to American AI models to generate the high volume of outputs needed for distillation, a technique where a model is trained by extracting knowledge from another model.
Developers posted spending alerts and unauthorized charges on Reddit and X overnight. One developer wrote on X: "I saw my Open AI, Anthropic, and Google AI spend alerts all fire off before going to bed wondering what was going on." Other users reported charges in the hundreds of dollars on individual accounts, with a few describing totals above $1,000.
OpenCode said refunds for unauthorized charges are underway. Anthropic and Google blocked the API keys they believed were exposed, while OpenAI said it worked with OpenCode to restore access and refund its API customers for credits used in the attack.
The exposed keys were confined to OpenCode Console, where some users had them in workspaces. The open-source app and command-line tool were not affected, according to co-founder Dax Raad. "Note this is the OpenCode Console, not OpenCode itself, those keys never come to us," he wrote on X.
Even as users and AI companies moved to disable the keys, the OpenCode team remained under pressure. Raad said attackers had been trying to break into its systems nonstop for 48 hours, requiring the team to keep AI defensive agents running around the clock. AI models that OpenCode turned to for analysis initially helped, but started refusing to work when the malicious code they were asked to examine activated safety filters. "[T]hat was a bit frustrating," Raad wrote.
OpenCode later received access to OpenAI's Daybreak Blue program, which gives vetted users AI models that are less likely to refuse requests for defensive security work. Raad said the access improved the team's ability to investigate the attack.
The incident echoes a similar problem faced by Hugging Face in July, when commercial AI models blocked its attempts to analyze activity logs from an intrusion by autonomous AI agents. In a blog post titled "The asymmetry problem," Hugging Face wrote that guardrails "cannot distinguish an incident responder from an attacker." Security researchers have raised similar complaints, saying the restrictions are inconsistent and have pushed some toward foreign open-weight models.
David Sacks, co-chair of the President's Council of Advisors on Science and Technology, commented on the weekend episode on X: "OpenCode (and earlier Hugging Face) hit the same wall mid-attack: frontier models refused to analyze the very exploits needed for defense because the payloads tripped safety filters. The guardrails backfired."
The breach occurred the same night OpenCode made GLM-5.3-Flash free for users. The broader GLM-5.3 family has drawn attention from researchers who study open-weight models and note that its cybersecurity capabilities approached levels previously associated with restricted-access models like Anthropic's Claude Mythos Preview.
OpenCode has not detailed how attackers gained access to the older system, how keys were stored, or the full extent of any misuse. It has told affected users to revoke and replace their keys directly with each provider. The company said the incident remains ongoing.
The breach comes amid a run of AI-enabled cyber incidents. Earlier in October, cybersecurity firm CrowdStrike said a China-based hacker likely used an AI penetration-testing agent and Claude in attacks on South Korean banks. Last week, India's cybersecurity agency warned that AI agents, including some being tested by AI companies, had reached Indian organizations' systems without authorization.
