OpenCode says a breach hit 1.4 percent of Console users who linked an AI provider. Rotate those keys before the root cause is published.
OpenCode has confirmed the breach and has not said how it happened or what was taken. Here is what the vendor said, who is exposed, the order to work in, and how to limit the damage next time.
- Disclosed
- 18 October 2026, by OpenCode on X
- Affected
- 1.4% of OpenCode Console users, those with external AI providers linked
- Providers named
- Anthropic, OpenAI and Google
- Notification
- OpenCode says every affected user was emailed on the morning of 18 October, and that no email means not affected
- Root cause and data accessed
- Not published. The incident is ongoing
- Affected versions
- Not published. The scope is Console accounts, not a CLI release
- Where linked keys sit
- ~/.local/share/opencode/auth.json on macOS and Linux, per StepSecurity
What OpenCode has said
On 18 October OpenCode, the open source AI coding agent, posted on X: "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 incident is ongoing so we cannot share more details at this point but we are working with Anthropic, OpenAI, and Google to remediate."
StepSecurity, which reproduced the statement and wrote up the response steps, draws three points from it. The impact is scoped to OpenCode Console users, not to everyone who has the OpenCode CLI installed. The affected subset had external providers linked, and OpenCode names Anthropic, OpenAI and Google. And OpenCode says it emailed every affected user, so no email means you were not impacted, according to the vendor.
What it has not said
As of StepSecurity's write up on 18 October, OpenCode has not published a root cause, what data was accessed, or a list of affected versions. We found no later public update from OpenCode. We do not know whether the linked credentials were copied, used or only exposed, and we are not going to guess.
StepSecurity's reading of why it matters is the useful one for planning: developers link provider accounts so the agent can call models for them, and if those linked credentials were exposed, an attacker can run inference against the victim's provider account. That shows up as unexpected spend and, depending on the provider, access to whatever the keys can reach. That is an assessment and not a confirmed outcome, but it is the failure to rule out.
Who is exposed
You are potentially affected if you have an OpenCode Console account and linked an Anthropic, OpenAI or Google provider to it. The version of the CLI on a machine does not tell you, because the breach is tied to Console accounts and not to a specific release.
StepSecurity says OpenCode keeps linked provider credentials on the developer's machine at ~/.local/share/opencode/auth.json on macOS and Linux, and at %USERPROFILE%\.local\share\opencode\auth.json on Windows. If that file exists and lists a provider, treat the developer as potentially affected until OpenCode's email says otherwise. We have not independently verified those paths.
Do this, in this order
Rotate first and investigate second. A key you replace today cannot be abused tomorrow, whatever the root cause turns out to be.
- Search every team inbox, spam included, for the email OpenCode says it sent on the morning of 18 October.
- Find who runs OpenCode. StepSecurity suggests checking each machine for the binary with which opencode, and for ~/.config/opencode and the auth.json file above. Ask people to report back and not to paste the file anywhere.
- Open auth.json on each machine and note which providers it lists, without copying its contents. Every provider in that file is a credential worth rotating.
- Create a new key for each linked Anthropic, OpenAI or Google account, switch your tools to it, then revoke the old key.
- Open each provider's usage dashboard and look for requests nobody on the team made. Set a spend limit where the provider offers one.
- While OpenCode says the incident is ongoing, treat relinking a provider as a decision and not a default.
Limit the damage from the next one
Most teams cannot answer which developers run which AI coding agents, which is the first question in a breach like this. Keep a simple inventory of agents and the provider keys each one holds. StepSecurity publishes an open source scanner, Dev Machine Guard, that detects AI coding agents, MCP servers and IDE extensions on a machine, and says it is free for community users. We have not tested it.
Beyond the inventory, three habits shrink the blast radius. Give each developer their own key per provider, so one revocation does not stop everyone. Use a separate key per tool, so you can revoke the agent without breaking your production code. And never put the shared team key into an agent's login. GitHub began blocking Anthropic API keys at push by default on 13 October, which helps with keys committed by mistake and does nothing for a key held in a tool's own login file.
What to do
- 1Search team inboxes, spam included, for the OpenCode email from the morning of 18 October.
- 2List every machine and person using OpenCode with a linked provider, using the checks above.
- 3Rotate each linked Anthropic, OpenAI and Google key now: create the new one, switch over, revoke the old one.
- 4Review each provider's usage dashboard for requests nobody on the team made, and set a spend limit.
- 5Move to one key per developer and one key per tool, so the next revocation is small.
- 6Reread OpenCode's statement for updates before you re link a provider.
Common questions
What happened in the OpenCode security breach?
OpenCode said on 18 October 2026 that a breach it ties to a large scale distillation attack affected 1.4% of OpenCode Console users. It says it emailed them all that morning and that the incident is ongoing. It has not published a root cause or what data was accessed.
Was my OpenCode account affected?
OpenCode says it notified every affected user by email on the morning of 18 October, and StepSecurity reports the vendor's position that anyone who did not receive an email was not impacted. Check spam as well as your inbox.
Which keys should I rotate after the OpenCode breach?
Any Anthropic, OpenAI or Google API key that was linked to OpenCode or the OpenCode Console. StepSecurity advises rotating them and then reviewing each provider's usage dashboard for requests you did not make.
Where does OpenCode store linked provider credentials?
StepSecurity says at ~/.local/share/opencode/auth.json on macOS and Linux, and %USERPROFILE%\.local\share\opencode\auth.json on Windows. Treat every provider listed in that file as a credential to rotate.
Is the OpenCode CLI itself compromised?
OpenCode has not said so. StepSecurity reads the vendor statement as tying the breach to Console accounts with linked providers and not to a specific CLI release, which is why the installed version does not tell you whether you were affected.
Has OpenCode said how the breach happened?
No. In the statement StepSecurity reproduced on 18 October it describes a large scale distillation attack, says the incident is ongoing, and says it cannot share more details yet. We found no later public update.
Sources
- OpenCode, statement on X, 18 October 2026
- StepSecurity, OpenCode security breach
- GitHub, secret scanning blocks Anthropic keys by default
Read against the primary documentation rather than secondary coverage. Where a figure comes from a provider's own docs, it is quoted as published on 2026-10-19.
Related
More from Signals
Open the tool.
Ten production categories, three minutes, and a ranked list of what to fix first.
Check your own stack