You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's the issue. Your OpenCode Anthropic auth is OAuth-based (Claude Pro/Max subscription). These credentials are restricted by Anthropic - they can only be used for the main Claude Code/OpenCode session, not for spawning additional API calls to other models like haiku.
The problem:
- Your explore agent is set to anthropic/claude-haiku-4-5
- Your librarian agent is set to anthropic/claude-sonnet-4-5
- OpenCode tries to spawn these using your Claude Pro/Max OAuth credentials
- Anthropic rejects: "This credential is only authorized for use with Claude Code"
Solutions:
Option 1 - Use different models for those agents (recommended):
{
"agents": {
"explore": { "model": "openai/gpt-4o-mini" },
"librarian": { "model": "openai/gpt-4o" }
}
}
Since you have OpenAI OAuth configured, those should work.
Option 2 - Get a separate Anthropic API key:
Set ANTHROPIC_API_KEY environment variable with a pay-as-you-go API key (not Claude Pro/Max). OpenCode should prefer this for direct API calls.
Option 3 - Use Google models:
{
"agents": {
"explore": { "model": "google/gemini-3-flash" },
"librarian": { "model": "google/gemini-3-pro-high" }
}
}
The Claude Pro/Max OAuth only works for the main orchestrator model - subagent spawning with other Anthropic models requires a proper API key.
This message is happening for few months now, it is not consistent.
But this is expected! the TOS (if you read it), do prevent the subscription usage outside CC and CD. They can detect it with pattern that CC don't do. or if you switch model mid conversation.
We use Claude Pro OAuth. When using claude-opus-4-6, we encounter Error: unknown certificate verification error, but claude-sonnet-4-5 works fine. Interestingly, after re-logging into Anthropic, claude-opus-4-6 starts working. This behavior is confusing. @harshav167
Activity
github-actions commentedon Jan 9, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
davejfranco commentedon Jan 9, 2026
After the las update I'm experiencing the same issue on MACOS
ZGltYQ commentedon Jan 9, 2026
Same
osullivandonal commentedon Jan 9, 2026
I am seeing the same issue on Linux with Claude Sonnet 4.5
chrisayl commentedon Jan 9, 2026
Ditto, troubleshooting with Claude:
igordertigor commentedon Jan 9, 2026
Same here on linux and independent of the specific model.
andersonkrs commentedon Jan 9, 2026
Same on Arch
b1naryDS commentedon Jan 9, 2026
It might be anthropic cracking down, see this issue on clawdbot
ramirlm commentedon Jan 9, 2026
It's anthropic closing the doors. Also happening on OpenCode
angelguillen10 commentedon Jan 9, 2026
same here
kevinefiles commentedon Jan 9, 2026
Guys this was fixed a few hours ago. It will get pushed but if you want to fix locally you can find the details here #7410
seuros commentedon Jan 9, 2026
This message is happening for few months now, it is not consistent.
But this is expected! the TOS (if you read it), do prevent the subscription usage outside CC and CD. They can detect it with pattern that CC don't do. or if you switch model mid conversation.
harshav167 commentedon Jan 9, 2026
this is solved. https://github.com/anomalyco/opencode-anthropic-auth/pull/11
angelguillen10 commentedon Jan 9, 2026
This worked for me:
25 remaining items
Hennoloe commentedon Jan 29, 2026
"plugin": ["opencode-anthropic-auth@latest"],
Just added this line of code and updated to version 1.1.41 and it worked for me.
itzcodex24 commentedon Jan 30, 2026
Seeing this same issue, even after adding said plugin to the config and "restarting" opencode as well as signing out and back into anthropic oauth.
Steffen025 commentedon Jan 30, 2026
Try the system prompt injection then: #7456 (comment)
isomoes commentedon Feb 9, 2026
We use Claude Pro OAuth. When using claude-opus-4-6, we encounter
Error: unknown certificate verification error, but claude-sonnet-4-5 works fine. Interestingly, after re-logging into Anthropic, claude-opus-4-6 starts working. This behavior is confusing. @harshav167similar https://github.com/anomalyco/opencode-anthropic-auth/pull/47
mahyarmirrashed commentedon Mar 19, 2026
Happening again...
avall commentedon Mar 20, 2026
Logged in claude (PRO Subscription):

cat ~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"snapshot": false,
"plugin": [
"opencode-claude-auth"
]
}
npm ls -g --depth=0 opencode-claude-auth
$HOME/.local/share/mise/installs/node/22.22.1/lib
└── opencode-claude-auth@0.5.2
Restart opencode > /connect > Anthropic (Claude Max or API Key)
... Nothing happens. It seems hanged
nevalions commentedon Mar 20, 2026
Yes it happens again, Failed to authorize
mrstruijk commentedon Mar 20, 2026
Same, it says that the code is invalid when trying to do
/connect, and throws a 429 error when trying to use one of the Anthropic models.This worked for me: https://github.com/griffinmartin/opencode-claude-auth
nevalions commentedon Mar 20, 2026
Any security checks on this repo, is it trusted to share auth data?
mrstruijk commentedon Mar 20, 2026
Good question...? Idk!
Joeyzzyy commentedon Mar 31, 2026
I put together a narrow fix for this.
Scope:
rekram1-node commentedon Mar 31, 2026
We cannot legally support this.
fix(proxy): keep the claude_code preset on meta requests
perf: one-line system prompt for meta turns