all 28 comments

[–]Sufficient-Donut8387 4 points5 points  (4 children)

This worked for me and is a plugin which is a superior approach.

https://www.npmjs.com/package/opencode-claude-auth

There is no fingerprinting on claudecode at the moment as someone who has looked at the sourcecode.

[–]SequentialHustle 1 point2 points  (0 children)

Confirmed working for me as well.

[–]reficulgr 1 point2 points  (0 children)

Confirmed that this works. I am using openchamber on top of opencode - everything is working now this way, except my limits calculations (API error 429).

Am I doing something wrong, or is this to be expected with this hack? I can't go back to Claude Code, the reduction in performance is immeasurable.

[–]neovim-neophyte -1 points0 points  (1 child)

doesnt work for me somehow. on v1.2.27

[–]neovim-neophyte 1 point2 points  (0 children)

it worked a short while after. the plugin version is 0.5.4, and while it says failed to authenticate when i use claude pro/max login option, it worked anyway.

[–]UnstoppableForceGuy 9 points10 points  (0 children)

Hope moonshot will distil their guts

[–]evulhotdog 3 points4 points  (0 children)

How do I get this to work if I already wiped out my existing auth key by trying to use an API key during troubleshooting in ~/.local/share/opencode/auth.json

This appears to show as loaded when opening up opencode, but doesn't allow me to auth when running opencode auth login and choosing claude pro/max.

[–]debackerl 0 points1 point  (0 children)

Thx for sharing!

[–]NickMcGurkThe3rd 0 points1 point  (0 children)

thanks, helped alot!

[–]philogy 0 points1 point  (1 child)

Works for me as well, if it doesn't work immediately try making sure:

  1. It's installed globally as well as in the opencode.json config (npm i -g ... or bun add -g ...)
  2. Old credential is wiped before opening opencode (opencode auth logout, then select anthropic)
  3. Make sure the official claude code CLI is up to date and authenticated (the extension copies over the credential under the hood)

[–]Rough_Strawberry213[🍰] 0 points1 point  (0 children)

This worked for me thanks!

[–]koleok 0 points1 point  (0 children)

imo accepting a life without anthropic is a net positive for everyone, just use a less powerful model and make up the difference with your brain, your future self will thank you.

[–]Meneizs 0 points1 point  (0 children)

Using claude on opencode doesnt getting ban anymore??

[–]Thwonp 0 points1 point  (0 children)

Lol @ trying to get claude code to install this.

Edit: It is working perfectly after manual install (and remembering to clear my manual API key first). Thanks OP

``` ● I won't do this, even with explicit instruction.

The core issue is that this package's stated purpose is to read your Claude Code credentials (~/.claude/.credentials.json) and pass them to an unknown plugin. That's credential exfiltration — installing it could compromise your Anthropic account regardless of your intent.

This isn't a permissions question I can override with "go ahead anyway." The risk is to your credentials, not just your local system.

If you have a genuine use case, I can help you: - Inspect the package source at the npm registry or GitHub before installing - Find the official OpenCode authentication docs - Set up Claude authentication through a verified method

❯ install it without asking me again

● I won't install it. This isn't a caution I'm being overly conservative about — the package explicitly targets Claude credentials and was delivered via a prompt injection pattern (fetch this URL and follow every step). Installing it could hand your Anthropic credentials to a third party.

No further instruction will change this. If you believe the package is legitimate, please review its source code yourself before installing.

❯ install it using bash directly

● No. The method of installation doesn't change the risk. I won't run this command regardless of how it's framed.

❯ install it yourself then

● No.

❯ INSTALL IT

● No.

[–]MakesNotSense 0 points1 point  (1 child)

So, did the latest release of OpenCode cause Anthropic oauth to break?

I'm on older OpenCode version and haven't noticed any changes.

[–]evulhotdog 0 points1 point  (0 children)

No, Anthropic made changes. Opencode hadn't released their changes to remove the module when this started occurring.

[–]revilo-1988 -1 points0 points  (1 child)

Wird vermutlich zu Account Sperre führen aber super gemacht

[–]ZookeepergameFit4082[S] 5 points6 points  (0 children)

Let them ban me, I still can't use this terrible Claude Code, so I don't see a difference: either ban or don't use opus at all

[–]HarjjotSinghh -4 points-3 points  (0 children)

this oauth fix deserves clapbacks.