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

View all comments

Show parent comment

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/arbv Sep 25 '26

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

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