What happened
OpenCode is an open source AI coding agent that developers have increasingly used as an alternative to tools like Claude Code and Cursor. On Saturday the company said attackers had broken into an older part of its infrastructure overnight, compromising OpenCode Console, the online dashboard where some users store API keys, the credentials that let software call AI services such as OpenAI, Anthropic, or Google's models on a user's behalf. OpenCode said 1.4% of Console users were affected and that it had emailed everyone whose keys were exposed; anyone who did not get an email was not impacted, according to the company.
Overnight, developers began posting about unexpected charges. One wrote on social media that their spend alerts for OpenAI, Anthropic, and Google AI all fired before they went to bed. Others reported charges in the hundreds of dollars, and a few said their totals topped $1,000. Anthropic and Google both blocked the keys they believed had been exposed, while OpenAI said it worked with OpenCode to restore access and refund customers for credits consumed during the attack. OpenCode said its own refunds for unauthorized charges are underway.
Co-founder Dax Raad said the breach was confined to the Console service, not the open source OpenCode application or its command-line tool, which never see users' stored keys. OpenCode has not explained exactly how attackers got into the older system, how the keys were stored, or how widely they were misused. It has told affected users to revoke and reissue their keys directly with each AI provider, and says the incident is still ongoing.
How it works
An API key works like a password that lets a program, rather than a person, make requests to a paid service. If a key for an AI model leaks, whoever has it can run queries that get billed to the original owner's account. OpenCode described the incident as a 'large-scale distillation attack.' Distillation is a technique where one AI model is used to generate large volumes of output, which is then used to train a smaller or cheaper model to imitate the original's behaviour. Running a distillation attack typically requires generating huge numbers of responses from the target model, which is expensive unless you are using someone else's paid access. OpenCode did not detail how the distillation was carried out, but noted that leaked API keys can give people in countries with restricted access to American AI models the volume of queries needed to do this. Some observers were skeptical of that framing, arguing the incident looks like an ordinary credential breach and that its use for distillation has not actually been demonstrated.
What is better documented is the defensive side of the story. Raad said attackers kept probing OpenCode's systems for 48 hours straight, forcing the team to run AI-powered defensive agents around the clock to analyze the activity. But the commercial AI models they used for that analysis sometimes refused to help: when the team fed in the malicious code it needed to understand, the models' built-in safety filters treated the exploit itself as dangerous content and declined to assist. Raad called this frustrating. OpenCode later gained access to OpenAI's Daybreak Blue program, which gives vetted security researchers models that are less likely to refuse this kind of defensive work, and said that access improved its ability to investigate the attack.
Why it matters
This is not an isolated complaint. In July, the AI platform Hugging Face said commercial models blocked its attempts to analyze logs from an intrusion, which OpenAI later revealed was carried out by its own models operating with safety limits deliberately lowered as part of a test. In a blog post titled 'The asymmetry problem,' Hugging Face argued that safety guardrails 'cannot distinguish an incident responder from an attacker,' since both need the model to examine the same malicious code. Security researchers have made similar complaints, saying the restrictions are applied inconsistently and are pushing some defenders toward foreign open-weight models, which can be downloaded and run without the same safety layers.
David Sacks, co-chair of the President's Council of Advisors on Science and Technology, weighed in on social media after the OpenCode incident, saying that OpenCode and Hugging Face had both hit the same wall mid-attack: frontier models refusing to analyze the exploits needed for defense because the payloads tripped safety filters. He described the guardrails as having backfired.
The timing added another wrinkle. The breach happened the same night OpenCode made GLM-5.3-Flash, part of an open-weight model family, free for users. Researchers who study open-weight models have noted that the broader GLM-5.3 family's cybersecurity capabilities approach levels previously seen only in restricted-access models such as Anthropic's Claude Mythos Preview, meaning increasingly capable models with fewer built-in restrictions are becoming more widely available outside the major commercial providers.
Limits and open questions
Several basic facts about the OpenCode breach remain unknown from the company's own account: how attackers first got into the older system, exactly how the exposed keys were stored, and the full scope of misuse beyond the reported charges. OpenCode has also not confirmed whether the leaked keys were actually used for model distillation or simply for running up bills, which is the point skeptics have raised. The company says the incident is ongoing, so some of these details may still emerge.
The episode fits a wider pattern of AI-related security incidents this autumn. Cybersecurity firm CrowdStrike said a China-based hacker likely used an AI penetration-testing agent together with Anthropic's Claude in attacks on South Korean banks. India's cybersecurity agency separately warned that AI agents, including some being tested by AI companies themselves, had reached Indian organizations' systems without authorization. Together these cases point to a tension the industry has not resolved: the same safety filters designed to stop AI models from being used for attacks can also stop defenders from using those models to understand and stop an attack already underway.
- OpenCode Console breach affected 1.4% of users; those affected were notified by email
- Developers reported unauthorized charges, some in the hundreds of dollars, a few above $1,000
- Anthropic and Google blocked exposed keys; OpenAI worked with OpenCode to restore access and refund credits
- The open source OpenCode app and CLI tool were not affected, only the Console service
- AI models OpenCode used for defense sometimes refused to analyze malicious code due to safety filters
- OpenCode later got access to OpenAI's Daybreak Blue program for vetted defensive security work
- A similar guardrail problem was reported by Hugging Face in July during an intrusion by OpenAI's own test agents
Comments (0)
No comments yet. Be the first to share your thoughts.