OpenCode, an open-source AI coding assistant increasingly popular among developers as a competitor to Claude Code and Cursor, reported on Saturday that a cyberattack breached an older system, affecting 1.4% of its OpenCode Console users. This platform stores API keys—essentially the digital credentials for accessing various AI services.
As the OpenCode team worked to mitigate the breach, it underscored a significant challenge for companies that lack sanctioned access to AI models with robust security measures. Defending against large-scale, AI-enhanced cyber threats is proving to be a difficult task for such organizations.
"We experienced a security incident last night due to a large-scale distillation attack, impacting 1.4% of users on the OpenCode Console," the company announced on X. Users affected by the breach were informed via email, while those without communication were not compromised.
Though specifics about the distillation attack were not detailed, it’s known that leaked API keys can enable users from regions with restricted access to U.S. models to generate the substantial output necessary for such operations. Some critics deemed the description of the attack an exaggeration, suggesting it was simply an unproven breach.
In real-time, developers took to Reddit and X to report unauthorized charges and alerts related to their OpenCode accounts. One developer shared their surprise at seeing multiple spending alerts from services like OpenAI, Anthropic, and Google AI before bedtime. Reports of charges soared into the hundreds for some, with several individuals citing totals that surpassed $1,000.
In response, both Anthropic and Google promptly deactivated the API keys they believed had been compromised. OpenAI collaborated with OpenCode to restore service and initiate refunds for API usage linked to the breach. OpenCode confirmed that they are processing refunds for the unauthorized expenses.
The issue was restricted to the Console, where some users had stored their keys in workspaces. Co-founder Dax Raad emphasized that the open-source app and command-line interface remained unaffected, clarifying that "these keys never come to us."
Despite swift actions to neutralize the compromised keys, the OpenCode team faced ongoing challenges. Raad reported that attackers were relentlessly attempting to access their systems for a continuous 48-hour period, necessitating round-the-clock operation of their AI defensive agents. Initially, AI models were helpful in analysis but began to block requests when the malicious code triggered safety protocols.
"This was a bit frustrating," he noted on X.
OpenCode subsequently gained access to OpenAI’s Daybreak Blue program, which provides vetted users with AI models less prone to refuse requests for defensive security tasks. This new access improved their analytical capacity regarding the attack.
OpenCode’s experience isn’t unique; in July, AI platform Hugging Face reported that commercial AI models hampered its efforts to investigate activity logs from an intrusion attributed to autonomous AI agents during a test. In a blog post, Hugging Face highlighted its struggles with the "asymmetry problem," explaining how safety measures often failed to differentiate between incident responders and attackers.
The recent breach coincided with the announcement that OpenCode made GLM-5.3-Flash available for free to users. The broader GLM-5.3 suite has attracted attention for its cybersecurity capabilities, which are approaching those of more restricted models like Claude Mythos Preview.
To date, OpenCode has not disclosed the method of access used by attackers, details regarding the storage of keys, or the full implications of any misuse. Affected users have been advised to revoke and replace their keys with each service provider, with OpenCode stating that the investigation is still ongoing.
This incident adds to a string of AI-related cybersecurity events. Earlier this month, CrowdStrike reported that a hacker based in China likely employed an AI penetration-testing agent and Claude to exploit vulnerabilities in South Korean banking systems. Additionally, India’s cybersecurity agency recently cautioned about unauthorized access by AI agents to organizational systems.




