> ## Content Index
> Fetch the complete content index at: https://engineerpal.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# OpenCode says Console breach may have exposed users' AI provider keys
- URL: https://engineerpal.com/opencode-console-breach-rotate-ai-keys/
- Published: 2026-10-18T22:24:46.000Z
- Updated: 2026-10-18T22:24:46.000Z
- Description: The breach hit OpenCode's hosted Console; its team says local CLI keys weren't involved, and affected users are told to revoke keys at each provider.
- Author: Nina Park
- Tags: AI, OpenCode, Anthropic, OpenAI, Google

OpenCode said Saturday (Oct. 17) that a breach linked to "a large scale distillation attack" impacted "1.4% of OpenCode Console users," and it told those users that AI provider keys saved in their workspaces may have been exposed.

The email said, "Third party provider keys (eg OpenAI, Anthropic) saved in your workspace may have been exposed," according to a screenshot posted to r/opencode and [shared on X by security writer Matt Johansen](https://x.com/mattjay/status/2111480005435719885?ref=engineerpal.com). It cited "unauthorized access to a legacy system that we were in the process of decommissioning." The same text was [posted on Hacker News](https://news.ycombinator.com/item?id=50133401&ref=engineerpal.com).

"If you did not get an email you were not impacted, it was a subset of users who had external providers linked," OpenCode said in [a post on X](https://x.com/opencode/status/2111519637049319818?ref=engineerpal.com) at 2:08 p.m. ET (11:08 a.m. PT; 1808 UTC). The company said it is "working with Anthropic, OpenAI, and Google to remediate."

> 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. If you did not get an email you were not impacted, it was a subset of users who had external providers…
> 
> — OpenCode (@opencode) [October 17, 2026](https://x.com/opencode/status/2111519637049319818?ref%5Fsrc=twsrc%5Etfw&ref=engineerpal.com)

OpenCode hasn't explained the "distillation" link; the term generally means training one model on another model's outputs, [Noma Security said](https://noma.security/blog/opencode-console-breach-what-security-teams-need-to-know?ref=engineerpal.com). Nor has OpenCode said how many people 1.4% represents, how the attacker got in, whether keys were encrypted or whether other data was accessed. "The incident is ongoing so we cannot share more details at this point," the [post](https://x.com/opencode/status/2111519637049319818?ref=engineerpal.com) said.

OpenCode also hasn't said whether the incident is contained. Its [status page](https://status.opencode.ai/?ref=engineerpal.com) lists no security incident; its only Console incident is "Console API elevated error rates" from 12:04 to 3:21 a.m. ET Sunday, with no cause given. This story is developing; EngineerPal last checked at 6:24 p.m. ET Sunday (Oct. 18).

Anthropic has acted on its side. "We've been working with OpenCode on yesterday's breach and have revoked Claude API keys we believe were affected," Lydia Hallie of Anthropic's Claude Code team [said on X](https://x.com/lydiahallie/status/2111563956666110287?ref=engineerpal.com) Saturday.

Some users reported charges before OpenCode's statement. Colin Parsons [posted](https://x.com/colinparsonscom/status/2111451256426250580?ref=engineerpal.com) at 9:36 a.m. ET Saturday that his OpenAI key used in OpenCode "has been pounded for $281 of usage, starting at 2am eastern," plus $168 on Anthropic. EngineerPal hasn't verified those charges.

Dax Raad, who builds OpenCode at Anomaly, [said on X](https://x.com/thdxr/status/2111608620441817449?ref=engineerpal.com) that "we already contacted everyone, refunds are already underway." He [told charged users](https://x.com/thdxr/status/2111603670601343242?ref=engineerpal.com) to "email me dax@anoma.ly with info and we'll get you refunded." OpenCode hasn't published a refund policy or said whether it covers charges billed by the providers.

## Am I affected?

According to OpenCode, if you didn't get its email, you weren't impacted. The breach involves the [hosted OpenCode Console](https://opencode.ai/v2/docs/console?ref=engineerpal.com), an optional web service where workspace owners and admins paste in their own provider keys. "Console stores the credential and serves each provider through its gateway," OpenCode's [Console documentation](https://opencode.ai/v2/docs/console/providers?ref=engineerpal.com) said.

The open-source OpenCode CLI works differently. Keys added with its `/connect` command "are stored in `~/.local/share/opencode/auth.json`" on your computer, according to [OpenCode's docs](https://opencode.ai/docs/providers?ref=engineerpal.com). "Note this is the OpenCode Console, not OpenCode itself, those keys never come to us," Raad [said on X](https://x.com/thdxr/status/2111572618340188393?ref=engineerpal.com).

The grey area is a CLI connected to a Console workspace. In that setup, the provider key lives in the Console, not on your machine, per [OpenCode's Console docs](https://opencode.ai/v2/docs/console/providers?ref=engineerpal.com) and [Noma](https://noma.security/blog/opencode-console-breach-what-security-teams-need-to-know?ref=engineerpal.com). OpenCode hasn't said how its email test applies to members whose admin added the key, so ask whoever pasted keys into the Console website.

![Diagram: the local OpenCode CLI saves keys in auth.json, while the hosted Console stores them server-side](https://engineerpal.com/content/images/2026/10/opencode-key-locations-diagram.png)

According to OpenCode's docs, the local CLI keeps your key in a file on your computer, while the hosted Console stores it on OpenCode's side, including for a CLI linked to a Console workspace. Image: EngineerPal

The Console also [accepts](https://opencode.ai/v2/docs/console/providers?ref=engineerpal.com) Google Vertex AI service-account files and Azure, Bedrock, Cloudflare and Databricks secrets. OpenCode hasn't said whether those were exposed. If you aren't sure, rotating takes minutes, and Hallie [said](https://x.com/lydiahallie/status/2111563956666110287?ref=engineerpal.com) anyone who saved a key in OpenCode and wants "to be extra careful" should create a new one.

## How to rotate your keys and check usage

Revoke each key at the provider, not just in OpenCode. "Changing a key in a gateway configuration is not the same as revoking the old key at the provider," Ron Harnik of Noma Security [said](https://noma.security/blog/opencode-console-breach-what-security-teams-need-to-know?ref=engineerpal.com). Save usage exports before asking anyone about charges.

1. **OpenAI:** For a leaked key, OpenAI says to ["rotate your key immediately"](https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety?ref=engineerpal.com) and [delete the affected key](https://help.openai.com/en/articles/8304786-keeping-your-openai-account-secure?ref=engineerpal.com) on the [API keys page](https://platform.openai.com/api-keys?ref=engineerpal.com). Create a replacement and update your apps, but don't leave the old key live meanwhile. Review [usage](https://platform.openai.com/usage?ref=engineerpal.com) for unexpected activity, keep the details and contact OpenAI Support through the Help Center chat.
2. **Anthropic:** On the [API keys page](https://platform.claude.com/settings/keys?ref=engineerpal.com), open the "…" menu and choose Delete API Key, even if Anthropic already revoked it. Create a new key with an expiration, then filter the [Usage](https://platform.claude.com/usage?ref=engineerpal.com) page by key and check the [Cost](https://platform.claude.com/cost?ref=engineerpal.com) page. Anthropic's [compromised-key guide](https://support.claude.com/en/articles/8384961-what-should-i-do-if-i-suspect-my-api-key-has-been-compromised?ref=engineerpal.com) covers support.
3. **Gemini API (AI Studio):** Generate a new key in [AI Studio](https://aistudio.google.com/apikey?ref=engineerpal.com), update your app, then disable or delete the old key in the Cloud console, per [Google's checklist](https://ai.google.dev/gemini-api/docs/api-key?ref=engineerpal.com). Check Dashboard, then Usage, and consider a [spend cap](https://ai.google.dev/gemini-api/docs/billing?ref=engineerpal.com).
4. **Google Cloud and Vertex AI:** Under APIs & Services, then Credentials, use Rotate key, update apps and delete the old key, per [Google's docs](https://docs.cloud.google.com/docs/authentication/api-keys?ref=engineerpal.com). Replace any service-account key you gave the Console, check Billing Reports and set [budgets and alerts](https://cloud.google.com/billing/docs/how-to/budgets?ref=engineerpal.com).
5. **OpenCode Console:** Replace or remove each credential on the Providers page, per [OpenCode's docs](https://opencode.ai/v2/docs/console/providers?ref=engineerpal.com). EngineerPal also suggests rotating other keys saved in an affected workspace, such as xAI or DeepSeek keys.

OpenCode said in its email that it "will follow up with any updates."