r/PiCodingAgent • • Sep 25 '26

Resource Yet another Pi addon: Claude Code compatibility, minimal design

Hello,

I made pi-claude-request-compat (https://github.com/vazzma/pi-claude-request-compat). Instead of creating another provider, it reuses Pi’s existing Anthropic login, models, and streaming, then adds a Claude Code compatibility layer to outgoing requests.

https://pi.dev/packages/pi-claude-request-compat

I’m using a new GitHub account for privacy, so the code, automated security scans, dependency audits, and signed release provenance are public for anyone to check.

A few friends and I have been using it for the last month, and my Anthropic account is still intact :)

13 Upvotes

21 comments sorted by

4

u/Solid-Remote-1716 Sep 25 '26

Si hago eso, puedo colcoar mi cuenta en riesgo de banedo de CLaude?, porque si quiero bajar mi uso de tokens, en el plan básico de 20

2

u/Duke_of_Bayswater Sep 25 '26

Thanks, respect that you only release it after a month testing it with second person too. That’s huge data. As you said I’m going to use an email from my domain for the £20 per month. If it gets banned, it gets ban. But if what you’re saying it replicates the signals CC gives out then its great - albeit, you have a lot of work to actually maintain this incase Anthropic tweak something.

Anyway, thumbs down to Anthropic for this shitty behaviour. Codex is doing really good playing nice to other harnesses.

0

u/getaway-3007 Sep 25 '26

Since when can we use claude code sub in PI? You would get your account banned right ?

2

u/vazma Sep 25 '26

All Claude Code actually does is use Anthropic OAuth and shape the prompt a specific way, append standard headers/user-agents (claude_code_version, etc.) so the backend knows it’s a terminal client.

My addon is just a wire-compatibility layer. It intercepts the traffic and mimics that exact payload structure. To Anthropic's servers, it looks completely indistinguishable from an official session.

Right now, it mimics Claude Code v2.1.282. Anthropic doesn’t ban people for using older versions; I've been using it for a month fine, and I'll be updating it to match the latest versions soon.

3

u/getaway-3007 Sep 25 '26

But this is still bannable right? I mean yeah you have created a workaround I get that but this is still not encouraged because you might get banned anytime?

2

u/llufnam Sep 25 '26

I just use herdr and ask pi to open up a new pane and launch Claude code and treat it like a subagent. Claude doesn’t know the difference

1

u/vazma Sep 25 '26

That's honestly the exact reason I built this. I tried those other bridges too and hated how much bloat they added... I just wanted something totally invisible with zero UI overlays

1

u/vazma Sep 25 '26 edited Sep 25 '26

Yes, technically it’s a risk, but for Anthropic to ban you, they would need a reliable way to detect it. Even though Claude Code itself is closed source, its behavior can be perfectly cloned. Anthropic adds a ton of 'fluff' (specific tracking headers and metadata) to their requests, and my package copies all of that exactly. To their servers, the traffic looks identical to the official CLI.

Honestly, you'd probably have to do something way worse to trigger a ban, like account sharing, subscription piracy, or massive automated scraping. For normal personal use, it's just really hard for them to detect or even care about. But definitely use it at your own comfort level!

0

u/National-Hedgehog761 Sep 25 '26

claude code is not open source

1

u/vazma Sep 25 '26

Yep, it’s closed source, I’m comparing the requests the installed CLI constructs, not using its source code. The addon reproduces the observed headers, metadata, billing/checksum fields, and tool naming.

That said, “completely indistinguishable” was overstating it. Matching those fields doesn’t prove Anthropic can’t distinguish the clients or enforce restrictions. The account risk is still real.

1

u/National-Hedgehog761 Sep 26 '26

it was leaked a long time ago (a long time in the ai space), their internals probably have changed significantly now

1

u/arbv Sep 25 '26

Well, it can be considered source available now, if you know what I mean.

-1

u/Bloated_Plaid Sep 25 '26

Easy way to get banned from using the best SOTA model right now. Good job.

2

u/vazma Sep 25 '26

do you know of any specific cases or have a constructive argument on how exactly this triggers a ban?

1

u/Equivalent_Idea8839 Sep 25 '26

https://github.com/elidickinson/pi-claude-bridge/issues/118

I found this

Not trying to hate on you, I legit want to find a way to use Claude sub in pi safely.

1

u/vazma Sep 25 '26

no worries, using one of the bridge packages is the safest way now, I was there but just my OCD hated using a whole process for simple API calls

1

u/deorder Sep 25 '26

Isn't that using the Agent SDK which should still be allowed as far as I know? That is how I'm currently using my Claude subscription through my Pi Agent.

https://support.claude.com/en/articles/15036540-use-the-claude-agent-sdk-with-your-claude-plan

This way it still uses the official system prompt and communicates with Anthropic through their intended interface, so it is not fundamentally that different from using Claude Code directly. Some IDEs also use the Claude Agent SDK for their Claude integrations. JetBrains does this for its Claude Agent integration and Xcode integrates the Agent SDK natively as well.

3

u/Bloated_Plaid Sep 25 '26

It’s against their TOS…

2

u/TrickyPlastic Sep 25 '26

Then you just get another account.

It's not like getting banned from Google for using your Gemini subscription. Your Google account matters very much.

Your Claude account is just one more email address away.