DEV Community

Urvil Joshi
Urvil Joshi

Posted on • Originally published at Medium on

I tried Pi after watching its founder explain why he quit Claude Code

A walkthrough of the open-source coding agent that fits in 1,000 tokens and the one reason I can’t fully switch yet.

A few days ago, I watched Mario Zechner the creator of Pi explain why he stopped using Claude Code. By the end, he’d convinced me to try it.

Pi is an open-source coding agent with four tools, a system prompt under a thousand tokens. And one idea : the agent should be minimal and should able to modify itself.

This post walks through what’s actually different about Pi, the demo I built to test it, an honest comparison with Claude Code, and the one reason I haven’t fully switched.

🍥Why Mario built Pi

Mario’s pitch is simple and authentic.

Modern coding agents got bloated.

Claude Code’s system prompt has got to roughly 14,000 tokens. Tools get added, modified, and removed between releases. System reminders get injected into your context behind your back. You aren’t the owner of your context and you have zero control over it.

Mario’s argument, paraphrased:

Models are already trained to be coding agents. They don’t need a 10,000-token system prompt explaining what a coding agent is. They know.

So Pi strips it all down. Four tools read, write, edit, bash. A system prompt under 1,000 tokens:

  • No MCP servers
  • No sub-agents
  • No permission prompts
  • No plan mode
  • No built-in to-dos
  • No background bash

Instead, the agent extends itself. You ask Pi to add a feature, it writes a TypeScript extension, you hot-reload, and you’re done.

An agent that adapts to your workflow, instead of the other way around.

That line is what got me to install it.

✨Installing Pi (60 seconds)

Head to pi.dev there’s a one-line install command. Or grab it from npm. Paste it in your terminal and you’re done.

Type pi to start it. Then /login to pick a provider.

You can sign in with your Anthropic, OpenAI, or GitHub Copilot subscription, or bring your own API key. Worth knowing: as of recently, Anthropic’s Pro plan limits don’t apply when you authenticate Pi with your Claude account . You’ll be billed as extra usage on top of the subscription for me it’s the dealbreaker.

I’m logged in with my Claude account, so /model lets me pick from any Anthropic model. I'm running Sonnet here. There's also a /settings slash command if you want to change reasoning level, theme, or hide thinking traces.

🔍Three things that are actually different in Pi

I won’t bore you with every slash command Pi’s GitHub has the full reference. But there are three design choices that genuinely set Pi apart.

1. The system prompt is yours

Drop a file called system.md in ~/.pi/agent/ and Pi uses your system prompt instead of the default. Want to keep Pi's prompt and just append your own rules? Use append-system.md.

This is huge. If you want to use Pi for non-coding work like research, writing or anything else you can swap out the entire instruction set. No coding agent I’ve used lets you do this. In Claude Code, you’re stuck inside the 14k-token prompt the team ships.

2. Sessions are trees, not lines

Most coding agents give you a linear conversation. If the agent went the wrong way ten messages ago, you re-prompt or restart.

Pi sessions are trees. Use /tree to see the full branch structure. Use /fork to create a new branch from any earlier message. You jump back to the point where things went sideways and continue from there so no re-prompting, no context loss and, no restart.

3. Bash does almost everything

Pi only ships four tools. There’s no dedicated grep tool, no find tool, no git_status tool. Just bash.

Mario’s reasoning: models are reinforcement-trained on bash. They know how to use it. Adding specialized tools is just added noise. If you want a custom tool, you build it as an extension.

There are also no permission prompts. Pi runs full access by default. Mario’s argument is that most users mindlessly click “accept” on every permission prompt anyway. If you want real human gates, build them as an extension.

🧰The part that sold me

Pi is a deliberately minimal harness. To get anything beyond the bare minimum, you have to build it. That sounds like a downside until you see what Mario gave you in return: the agent ships with full knowledge of its own source code, and it can extend itself.

In other words, you ask Pi to add a feature. Pi reads its own extension docs. Pi writes the TypeScript file. You hot-reload. The feature is now part of your agent.

I’ll show you two extensions.

Extension 1: rebuilding my Claude Code orchestrator in Pi

If you read my last post, you saw my issue-to-PR workflow in Claude Code. It’s an orchestrator sub-agent that spawns four other sub-agents with human approval gates in between.

When I switched to Pi, I wanted the same workflow. But Pi has no sub-agents.

So I had two choices:

  • Option A :- spawn separate Pi processes. Each phase runs in its own isolated context window. This mirrors Claude Code’s sub-agent model exactly.
  • Option B :- single shared session. All phases run in one continuous Pi conversation. Higher token usage, but simpler to demo.

For this demo I went with Option B. For real production work, I’d use Option A.

I won’t walk through the full flow as its already there in my previous post. The point here is that the same multi-phase, gated workflow I used Claude Code’s sub-agent system for, I rebuilt as a single Pi extension. A TypeScript file in ~/.pi/agent/extensions/. Hot-reload, and it's live.

Extension 2: a status widget Pi built for itself

This one’s the demo that captures Pi’s whole pitch in 30 seconds. Everyone on Reddit is building this, so I built one too.

I gave this Prompt :

Read your own extension docs and build a status widget that shows the current git branch and number of uncommitted changes. Save it to my extensions folder.

Pi read its own documentation, wrote the extension, saved it to the right path, and told me to run /reload.

I ran /reload.

The status bar at the bottom of my terminal now showed my git branch and uncommitted file count. The agent had just extended itself. Live. In one prompt. Try doing that in Claude Code.

🏁Skills

Pi also supports skills. They live in ~/.pi/agent/skills/ (or in your project repo for project-local skills).

To invoke one, type /skill and write your prompt. There's nothing radically different from how skills work in other agents you just paste your skill and call it like above.

✨Pi vs Claude Code — honest comparison

Here’s what each one ships out of the box.

Claude Code has permission prompts, MCP support, sub-agents, plan mode, a large system prompt, and is locked to Anthropic models. It’s a finished product. Everything you need is there on day one.

Pi has four tools, a sub-1,000-token system prompt, multi-provider support (Anthropic, OpenAI, Copilot, OpenRouter, Ollama, and more), an editable system prompt, extensions, and the ability to modify itself. It ships none of features by default but you can build any of them as extensions, or install someone else’s package.

If you want something that works on day one, Claude Code wins. If you want to actually own your workflow, Pi wins.

✍️The one reason I can’t fully switch

Anthropic bills your Pi sessions as extra per-token usage. Effectively, you’re paying twice once for your subscription, again for every Pi token.

That’s not Pi’s fault. It’s Anthropic’s policy. But it means switching to Pi while keeping my Anthropic subscription is financially dumb for me right now.

If I weren’t on Anthropic and if I was using a ChatGPT subscription, or Copilot, or running local models with Ollama Pi would be my full-time coding agent. The minimalism, the extensibility, the fact that I control my context. Mario nailed it. This is how I want my coding agent to work.

So for now, Pi sits next to Claude Code in my workflow.

🎗️Reference

Top comments (0)