01What is the OpenCode AI hack?
The OpenCode AI hack is a security breach where thieves stole API keys from OpenCode's console. These keys let them use AI services like OpenAI and Anthropic, charging the owners for the usage. The hack happened on October 16 and affected some console users.
API keys are like house keys for your AI accounts. Whoever holds them can use your AI and the charges land on your account. OpenCode's console stored keys for teams, so a breach there meant keys could be stolen.
This story matters because it shows a new kind of theft: stealing AI access itself.
02What happened in the OpenCode breach?
On October 16, someone got into an old OpenCode system. The next morning, affected users got an email saying keys from outside providers might have been exposed. Security researcher Matt Johansson flagged it publicly, and OpenCode confirmed it.
OpenCode said 1.4% of console users were affected, but they didn't say how many that is. Some users reported charges overnight: one had over $400, another had $1,700. Max Weinbach confirmed his balances were drained.
Even co-founder Dax Rode's personal accounts were targeted.
The company linked the breach to a distillation attack—thieves copying AI models. They said the incident is ongoing, so details are still limited.
03Why did thieves want the AI keys?
Distillation is when you ask a smart AI model millions of questions and use the answers to train a cheaper model. It's normal, but copying without permission is a problem. Anthropic caught Chinese labs doing this, with over 16 million exchanges through fake accounts.
The real prize is the model's reasoning—its step-by-step thinking. Anthropic found that training on full reasoning scored 80.4% on a coding test, while summaries only scored 71.8%.
AI companies are now better at stopping fake accounts. Anthropic says they cut copied data by 90-99% and ban accounts quickly. So thieves now want real, trusted keys to avoid detection.
That's why they targeted OpenCode.
04How to set up your API keys safely
To protect yourself, set up your keys the right way. Follow these steps:
- Use a separate key for each tool or app you use.
- Set a spend limit on every key so a thief can't run up huge charges.
- Put each tool's key in its own workspace with its own limit.
- Check your provider's usage page regularly to know what normal looks like.
- If a key leaks, revoke it and make a new one immediately.
These steps are simple settings, no code needed. Think of it like setting a daily limit on your bank card. If you can do that, you can secure your AI keys.
05What to do if you were affected by the hack
If you got the email from OpenCode, act now. Switch off the affected keys in each provider's dashboard. Make new keys and update any apps that use the old ones.
Check your usage from October 16 onward for anything strange.
Anthropic was quick to revoke affected Claude keys. OpenCode also advises this. If you used one key for everything, you'll need to replace it everywhere.
That's why one key per tool is better—you only change one key.
Remember, providers are watching for strange usage, but that's not your safety net. Charges can still happen before they act. So take control yourself.
06Tips to avoid future AI key theft
Here are key tips to avoid being a victim:
- Never paste a key into a tool and forget it. Know where it lives.
- Check for old keys in retired tools or test projects—those are weak spots.
- Use a separate key for each tool, not one master key.
- Set spend limits and rate limits on every key.
- Monitor usage regularly so spikes stand out.
Also, be aware that any tool that stores your key can be hacked. The lesson isn't to stop using AI; it's to secure your setup. A breach like this is rare, but the damage can be real.
07Who should care about this breach?
This affects anyone using AI tools in their business—Claude, ChatGPT, Gemini, or any agent. Even if you never touched OpenCode, this story is about you, because thieves want keys from any trusted user.
If you use AI agents for SEO, content, or avatars, you need to protect your keys. The old thinking was 'Is this tool safe?' The new thinking is 'Where is my key right now?'
Don't quit AI because of one breach. That's like never driving again because someone's car was broken into. Just lock your car and keep driving.
08What this means for the future of AI security
This breach shows a shift in hacking. Thefts are no longer just about passwords or credit cards; they're about AI access itself. Stolen keys let thieves ask top models millions of questions on your account.
AI companies are fighting back, but it's a cat-and-mouse game. They block one trick, and thieves try another. Real keys become the side door.
So the way you set up your agents matters more than before. With one key per tool, spend limits, and normal usage checks, you can still use AI safely. The fix is simple, and it's worth it.