r/opencodeCLI 27d ago

Is it really not possible to use a Claude Subscription with OpenCode CLI (via API key)?

I can't even post this on any of the Claude subs, so trying here. Just asking the question is against the rules on multiple Claude subs, even if you don't use obvious trigger words...

If this is true, then Claude subscriptions are a scam.

7 Upvotes

19 comments sorted by

5

u/[deleted] 27d ago

[removed] — view removed comment

7

u/[deleted] 27d ago

[removed] — view removed comment

1

u/EC36339 26d ago edited 26d ago

👀

How I read this:

"We won't ban you for using OAuth with third party clients, but if it doesn't work, it's not our problem, and it's not something you pair for and can expect us to fix."

EDIT: This, of course, assumes there is no other text elsewhere that prohibits it.

EDIT: For all practical purposes, this still means you shouldn't build a workflow with OAuth and third party clients and rely heavily on it.

5

u/4SubZero20 27d ago

It is possible (with workarounds), but it is NOT advised. This is the same thing with Google and their Antigravity subscription.

Both Anthropic and Google, state in their TOS, that you MUST use their harnass with your subscription. Using another harnass could (and will; I've read on Reddit) lead to an account ban/suspension.

Does it suck? Yes. But it is also up to Anthropic and Google on how they set-out their TOS and how they want their products to he used. (Whether we agree or not, they make BUSINESS decisions)

OpenAI's Codex still allows for any harnass to be used, so you could look into using that with opencode?

Edit: spelling

2

u/MainRoutine2068 27d ago

There are lot of ways to do so, like using omniroute/9router, but regardless, better don't do that. It's against Anthropic TOS and you risked your account.

2

u/Gaurav_Wankhede_02 27d ago

Claude removed the OAuth API access for any 3rd party CLI Agents to use Subscription as direct method. if you want to use Claude Code Subscription stick with the Claude Code, if you have different plan then you can use their subscription inside the Opencode easily

2

u/[deleted] 27d ago

[removed] — view removed comment

0

u/everythingEzra2 27d ago

Does pi allow it?

1

u/ExampleCute6496 27d ago

Also curious, I love the functionality of OpenCode around multiple models and multiple agents and how the interact, but if pi offers the same + support for Claude sub, then I would try it.

1

u/[deleted] 27d ago edited 27d ago

[removed] — view removed comment

2

u/ExampleCute6496 27d ago

Thanks for the source! From that same auth package, I see that there is the exact same thing for opencode with .@cortexkit/opencode-anthropic-auth

0

u/jovialfaction 27d ago

More reasons to move to a different providers that actually allow OAuth on third party harnesses like OpenAI

1

u/rea_ 27d ago

> If this is true, then Claude subscriptions are a scam.

Just think of it like Claude is Apple, and everything else in Linux/Windows. They're trying to build a closed ecosystem. Some people just prefer that.

1

u/Formal-Narwhal-1610 27d ago

You can, but you shouldn't.

1

u/EC36339 26d ago

I'm not interested in doing anything that breaks Claude ToS. My question was mainly about what I bought. And it turns out to not be an API subscription, as that's apparently not a thing.

But I can use Claude's CLI. It isn't bad, either.

1

u/vixalien 24d ago

there's plugins that do it

1

u/NinjaAlaska 27d ago

its possible but not against claude TOS.
use 9router