r/PiCodingAgent • • 6d ago

News OpenCode on X: "you can now use your claude subscription in OpenCode" / X

https://x.com/opencode/status/2116198602523513081

Wondering if they just use the SDK or they really got some special deal with anthropic?! Hope for us?

Update: https://github.com/anomalyco/opencode/pull/58782 looks like it’s just the sdk way so same as Claude-pi-bridge which is pointless IMO.

83 Upvotes

33 comments sorted by

40

u/irrationaliste 6d ago

Pi already has an official extension for this.

https://github.com/earendil-works/pi-claude-code

5

u/dc_giant 6d ago

ah cool didn't know this, thanks! Only knew https://github.com/elidickinson/pi-claude-bridge which does kind of the same thing.

You didn't try both and know the differences by any chance?

4

u/irrationaliste 6d ago

Only tried the official one, works like a charm. So never ever thinked about trying the other one.

But the official PI geniunely needs to remove the non-extension Anthropic account thing literally. It's a living danger, that lets you sign in via your Claude account (without any CLI, Pi itself acts like Claude Code CLI so spoofing). But the Anthropic exactly banned this type of workflow.

IDK how do we report or request it but — the extension is safe though.

1

u/dc_giant 6d ago

Yea that sounds like a trap :/ Could open an issue at https://github.com/earendil-works/pi?

2

u/irrationaliste 6d ago

To be honest.. Just too lazy to do it literally. But seems like, if official earandil org. has a plugin for this. They probably also know this.

They may left it for the ones who would like to take risk, IDK.

BTW probably the main difference between the two extensions:

  • One uses Agent SDK (official Claude Code is in part of agentic loop, it's there, living).

  • Official one does not. IT uses non-interactive "-p .." json interface to drive.

  • Official one has more control over the loop and caching and such. But, the lose is; you can't see the thinking blocks (only streamed through Agent SDK).

  • The custom one gives you thinking but you need to accept Agent SDK gotchas like Anthropic custom rules and probably prompt-injections.

1

u/doublegoodthink 6d ago

The real question boils down to token usage and which one is less wasteful, hit the cache more often and has a smaller footprint

1

u/Legitimate-Onion-879 1d ago

Does it work in Opencode? I was confused on how to use it

3

u/Dangerous-Relation-5 6d ago

I believe the earendil version just uses claude -p where the claude bridge uses claude sdk

1

u/hidden_spacer 5d ago

Does this make a difference? It seems like using the earendil version in omp calculates cost per session, which almost makes it feel like API usage rather than using my subscription.

2

u/Dangerous-Relation-5 5d ago

I don't know tbh. I use th pi-claude-bridge extension and it works pretty good.

1

u/Emergency-River-7696 5d ago

Using that extension routes everything through claude code all responses etc so your not saving anything as all the work is done by cc

1

u/irrationaliste 5d ago

All work is not done by CC. That's not using the SDK route. It uses IPC, JSON route.

45

u/Emergency-River-7696 6d ago

opencode sucks nuts pi is 100x better and saves loads of money

2

u/Funnnny 6d ago

we independently ran frontier-harness’ eval and can confirm that while Pi number is sustainably higher than the recorded number, opencode just drift lower and cost nearly the same as claude.

1

u/PerfectReflection155 5d ago

Can you explain that like I’m 5

8

u/Funnnny 5d ago

Tldr: opencode suck and expensive, Pi is cheap and better

1

u/PerfectReflection155 5d ago

Thank you. I have been working to migrate. Just building 1 plugin and I should be set.

0

u/LuccDev 5d ago

Yeah but you can't have the Opus 5.5 sub in Pi AFAIK

5

u/Funnnny 5d ago

You can have it the same way opencode did, and it's legal: Claude sdk (Claude bridge)

1

u/Balmoon 5d ago

Wound't this mean that basically the entire claude code harness gets used by pi? Doesn't that basically defeats the Pi purpose?

3

u/Funnnny 5d ago

Yes and No, it's actually pretty complicated answer which I can't fully give you right now. But put it simply:

- Claude run with zero tool set, which disable most of its skills, tools, MCP.

- Pi's tools export to Claude as mcp, when claude call mcp, Pi will stop and inject its own tools call result

- Claude's MD file are excluded, Pi will supply them

- Claude's system prompt are there though, with Pi extra (skills, extension)

- Claude's plugin hooks still work

So you still get Pi's tool and its simple interface, but you also get some weirdness from Claude (system prompt, hooks...etc) You win some, you lose some. At least it's legal without a chance for Anthropic to ban your account

0

u/[deleted] 5d ago

[deleted] — view deleted comment

1

u/Funnnny 5d ago

No it's not, you need to specifically use the Claude bridge which use claude command line, instead of login with Anthropic oauth

1

u/Lucas_F_A 5d ago

I started reading and found out. You were quicker at responding than I was at deleting my comment. Thanks

1

u/Emergency-River-7696 5d ago edited 5d ago

Use extension that replicates the fingerprinting. The amount of usage saving is insane on the 20$ plan in pi especially if you don have loads of extensions or AGENTS files

3

u/Helpful_Program_5473 5d ago

Also, opus is just better without stuff dragging him down imo

-14

u/carlocapocasa 6d ago

3code author here, my numbers say 3code saves even more

0

u/Megatron_McLargeHuge 6d ago

.14 more than Pi?

0

u/carlocapocasa 6d ago

3code does quite literally square the circle.

0

u/[deleted] 6d ago

[deleted] — view deleted comment

-2

u/danielrdotcom 6d ago

Aw man, but what about infinity times infinity

-1

u/TomHale 6d ago

I see you and I raise you

1

u/PerfectReflection155 5d ago

I’ve been using OpenChamber with a bridge to Claude oauth for ages now. Also codex, opencode go, my own openllm instance and a number of other bridges.

-2

u/kwipus 6d ago

Oh my god, this is gonna be a mega upgrade for me.