Plugin
One Code: a pi package that adds almost all Claude Code's features (plan mode, subagents, auto mode, hooks, MCP) to pi
I've been building One Code, a pi package that brings the Claude Code workflow to pi. If you already run pi:
pi install npm:one-code-extension
It's 53 extensions, no fork and no patches to pi, just the normal extension API. Tested on pi 1.0.0 through 1.5.
What you get: plan mode, permission modes including auto mode (a classifier decides which commands need your approval), subagents that can each run on a different provider, git worktrees, hooks, skills, slash commands, MCP, plugins, background shells, memory and compaction. It also reads an existing CLAUDE.md and .claude folder as is, so if you're coming from Claude Code your setup carries over.
There are already good pi extensions for some of these, like subagents, and you can put together a decent setup from a collection of them. The catch is that any one of them can break the prompt cache if it rewrites earlier parts of the conversation, and they don't know about each other. So in One Code I tried to make the extensions work as one system, and keeping the cache stable was a big part of that. Every request is recorded as it was sent, and later requests only append to it, so cache reads stay high across resume, fork and reload.
There's also a bundled app with pi pinned inside, if you'd rather keep it separate from your own pi setup.
Yeah we needed a different extension to support Claude code hooks. Pi converts hyphens to underscores. Ours preserves them so existing permission rules and hooks still match. But I hope to reuse Pi MCP in a future release
Got it. Keeping the full command and argument transcript gives the classifier the context it needs, while still letting the approval rule preserve the exact strings it will execute. That should also make a replay or audit easier when a command is resumed.
Shaddup, claude code still sends some of your prompts to Anthropic when you run it locally. Some of the functionality are not available unless you subscribe through them. For example, decision making/smart auto approval they have, or /remote-control
we are not talking about imitating quirks and useless stuff, those are useful harness tools. basically you have all claude code's features (the harness most people used first) + all the features from Pi, like the extensions, patches, different providers... hell the guy literally mention his use case with different providers and models and you guys are still bitching about "just use claude code".
You use Pi to escape Claude Code's bloat. Its very intentionally designed to work with just few tools. Sure go ahead add 53 extensions all at once, whatever floats your boat!
"hurr but you use pi to escape claude code's bloat"
meanwhile in the official Pi website:
"Pi is a minimal agent harness. Adapt Pi to your workflows, not the other way around. Customize Pi with extensions, skills, prompt templates, and themes. Bundle them as Pi packages and share via npm or git.
Pi ships with powerful defaults but skips features like sub-agents and plan mode. Ask Pi to build what you want, or install a package that does it your way."
it literally TELLS you to extend it instead of using it as it is. the whole point of Pi is extending it as much as you want, NOTHING to do with bloat nor to "hurr but its designed to work with just a few tools".
No harness is "designed to work with just a few tools". Pi gives you a bare-minimum. That's not a limitation. That's just a reliable ENGINE behind, you can build your own on top of it.
just stop being an asshole, what can't you understand about people liking the way claude works and combining that with the whole customization they can do on pi?
I doubt that in your head, your "hurr just use claude" makes any sense, you just want to bitch.
no way people are downvoting this wtf how is this guy wrong??
the point of Pi is literally to offer you a bare-minimum harness for you to do whatever you want
if someone want to make it claude code? sure, THEY CAN, then it would have all claude code features PLUS Pi whole harness to customize AND different providers.
I tried this, but qwen 3.8 flash next failed 5 tool calls in a row (usually it never does) and got stuck on random stuff. I really wanted this to work :/ Good job tho!
tbh I use the gyro S quant locally, which does brain damage so I'll take the L. But it works fine in opencode/pi. This is not a strong agent so thats on me :d
53 extension in one? Maintaining them all would be hard I'd imagine. Still, good job! Compiling pi using `pi-bolt` might be the way I believe to get the best performance of this big setup.
5
u/kelvie 23d ago
MCP is already in pi though?