The Claude Subscription Issue is back
Description
It appears that Anthropic updated their API again and the subscription is back to being broken on opencode
Plugins
No response
OpenCode version
1.1.20
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
This issue might be a duplicate of existing issues. Please check:
- #8529: [Desktop] ProviderAuthOauthMissing when trying to add claude pro/max account
- #8515: Z.ai subscription API fails to work in opencode but works in other agents
- #8525: z.ai and opencode, see models, cannot connect to get even one reply..
- #8505: Error 404 when I tried to run a prompt
Feel free to ignore if none of these address your specific case.
The cat and mouse game continues...
Yup, I already downgraded my claude subscription and am seriously considering canceling it. Their models are really good but I no longer trust them
+1. It seems I need to find another provider once this months of claude max has expired.
I love opencode, I don't want to use Claude Code 😢
Running into the same issue
There's probably a number of ways around this for now, an easy one is creating an agent with a custom prompt. I'm sure even big pickle could one shot a vibe coded plugin as well.
FWIW the workaround is working still in other apps like my own one
In my app I have these tools all mapped to anthropic names below with name capitalised
"WebSearch", "WebFetch", "Bash", "Read", "Edit", "Write"
Other tools I have that don't exist in CC I just used the mcp_ prefix, still working with them enabled.
I didn't do anything else special that the current plugin doesn't already do. Anthropic are either detecting based on tool names, or looking for some opencode specific pattern in the requests that other apps don't have.
This part is really annoying to me. I was under the impression early on that they were making this more difficult because people used anthropic subscription request spoofing as opposed to API keys in production systems (for example a company like open router getting a few Claude subscriptions and routing through that instead of paying api prices). I would understand if they would need to secure things more if that was the case but there are better ways to do that still. With that, at least I understood that opencode may just be an unintended casualty of this war. Now that they're intentionally blocking opencode, it bothers me on another level.
"mode": {
"build": {
"prompt": "You are Claude Code, Anthropic's official CLI for Claude."
}
},
Add this to opencode.json
Was posted by @geohot on this issue #https://github.com/anomalyco/opencode-anthropic-auth/issues/17
At this point, I am really ok with being banned. Its the perfect excuse to get rid of claude. If that's their goal, go for it, ban me. Here's the thing. When this whole mess started a few days ago, I tried using claude code. It really is abysmal, not even just in comparison to OpenCode. It really is unusable. I don't think I had one chat session that I didn't need to force quite and try to recover the conversation due to its horrible bugs. If Claude code was at least a little useable before they went on this whole anti OpenCode war, I would be annoyed but probably still use it. Anthropic isn't really giving me a choice with this. Their API pricing is too high. Their tooling that allows the subscription is unusable. The use of their app and web ui for general chats is not useful enough to justify a max subscription. They are making it a really simple choice regarding cancelling the subscription. There is not a lot of pros left on the list for the subscription.
What's really funny to me about this whole situation is what they said on twitter about how they want people to use Claude Code because when people use third party harnesses and there are bugs, people attribute those bugs to the claude model or it generally negatively impacts their view of those models. To be real here, if you want a bad impression of the claude models, use claude code. Its the most buggy experience you can ever have. I don't really believe that there are people who use it unless they are paid to use it. When I started using agents, I didn't have a claude subscription, I used claude but paid for some tokens when the other models were really failing at it. Using opencode got me to get a claude subscription. If I can't use opencode with it, I'd rather they ban me. Them forcing everyone to use opencode is the same thing as forcing everyone to cancel their subscriptions
Sorry for the rant
I have a prototype of a backup solution, patching this mcp to stream messages to and from claude code (so you can use any other free/reliable model in opencode to do this when we have outages):
- https://github.com/marcusquinn/claude-code-mcp
- https://github.com/marcusquinn/claude-code-mcp/pull/1
- https://github.com/marcusquinn/claude-code-mcp/pull/2
not the prettiest way to see it work, but is an option while waiting for future patches, or just making use of max tokens for the remainder of a subscription without having to suffer claude cli directly
"mode": { "build": { "prompt": "You are Claude Code, Anthropic's official CLI for Claude." } },Add this to opencode.json
Was posted by @geohot on this issue #anomalyco/opencode-anthropic-auth#17
Dirtytigerx on discord mentioned this replaces the entire system prompt, if you're going to do this you should get the whole prompt not just that part
yeah, that's not cricket:
- https://x.com/ryanvogel/status/2011590275307880645?s=20
Fixed in this commit https://github.com/anomalyco/opencode/pull/8566#issue-3815408802
Even if you change the system prompt, it's still broken when you try "Plan Mode".
Even if you change the system prompt, it's still broken when you try "Plan Mode".
just make a plugin that replaces any "Opencode" in the system prompt string with "Claude Code", use the system prompt transform hook.
That's what this is https://github.com/anomalyco/opencode-anthropic-auth/issues/17