Ever since Claude Code launched, the conversation in every dev discord I’m in has been the same: “Can we get this without the Anthropic lock-in?” The answer, as of mid-2025, is Pi Agent Harness — and the community has spoken loudly. 64,000 GitHub stars, 7,800 forks, and 4,600+ commits from a core team that includes mitsuhiko (yes, the creator of Flask and Sentry). But that’s not just traction. No, that’s a movement.
I’ve been running Pi for the past week across a few real projects — a Remix web app, some Python data pipelines, and a monorepo that’s been collecting technical debt for months. Here’s what I found.
What Makes Pi Agent Harness a Different Open Source Coding Agent
Still, Pi isn’t a Claude Code clone. It’s a full agent harness built from four packages that work together:
| Package | What It Does |
|---|---|
| @earendil-works/pi-ai | Unified LLM API — works with 20+ providers |
| @earendil-works/pi-agent-core | Agent runtime with tool calling and state management |
| @earendil-works/pi-coding-agent | The CLI you actually use |
| @earendil-works/pi-tui | Terminal UI with differential rendering |
If you’re comparing agent harnesses, our ECC Agent Harness OS review takes a different route — it wraps multiple CLI agents (Claude Code, Codex, OpenCode) under one umbrella. Pi is the opposite: one CLI, many model providers.
The philosophy is refreshing: adapt Pi to your workflow, not the other way around. So you’re not stuck with a single model provider. Nor are you locked into Anthropic’s pricing. Even better — you can swap between Claude, GPT-4, Gemini, DeepSeek, Groq, or local models, all from the same TUI.
First Impressions: Installation and Setup
npm install -g --ignore-scripts @earendil-works/pi-coding-agent
export ANTHROPIC_API_KEY=*** it. So three commands and you're in the TUI. I tested this on my Ryzen 9 workstation and it took about 30 seconds total. Then the TUI loads with a clean split-panel layout — messages in the main pane, editor at the bottom, footer with token usage, cost, and active model. Even the border color changes to indicate "thinking" level. Yeah, nice touch.
But what caught me off guard: Pi's TUI is snappier than Claude Code's. The differential rendering in `pi-tui` means only the changed parts re-render. So no full-frame redraws, no flicker. It honestly feels native.
## Pi Agent Harness Extensibility: An AI Agent Toolkit That Actually Works
Claude Code lets you customize things — but Pi makes it a first-class feature. Pi is built as a TypeScript agent framework, so everything you extend it with is type-safe and npm-compatible. You can extend Pi with:
- **Skills** — task-specific capabilities loaded via `/skill:name`
- **Extensions** — full TypeScript modules that register commands, replace the editor, add UI widgets, or hook into events
- **Prompt Templates** — reusable prompt fragments expanded via `/templatename`
- **Pi Packages** — shareable collections of the above, distributed via npm or git
Now, I installed a community package that adds Jira ticket lookup and branch creation from within the TUI. Did I need it? Honestly? No. But the fact that someone built it and I could install it in 10 seconds says a lot about the ecosystem.
## Session Management: Pi Agent Harness's CLI Agent Killer Feature
Here's where Pi genuinely outshines Claude Code. Sessions are stored as JSONL files with a **tree structure**. Every message has an `id` and `parentId`, so you can branch in place without creating new files.
Hit Escape twice and you get `/tree` — a visual tree viewer of your session history. So you can jump back to any point, continue from there, and switch between branches. And all in the same session file. So no context loss. No "uh, let me remember what I was doing three forks ago."
And I used this constantly. I'd be debugging a Python pipeline, go down a rabbit hole ("let me refactor the data loader"), realize that's a separate issue, hit `/tree`, jump back, and continue the original flow. Even so, it works exactly the way my brain works.
If you're into agent session models, our [Claude Mem review](/posts/claude-mem-review-2026-06-11/) shows a completely different approach — persistent memory across sessions rather than branching within one. Both solve the "context loss" problem, just from opposite ends.
## What to Watch Out For
That said, Pi isn't without rough edges. In my testing, I noticed a few rough spots:
- **No built-in permission system.** So Pi runs with your user's permissions. The team recommends Docker or a micro-VM for isolation — they call this the "Gondolin" pattern. Worth setting up if you're running it on sensitive projects.
- **Compaction is lossy.** Automatic context compaction kicks in on overflow. Still, the full history stays in the JSONL file, so you can revisit with `/tree`, but the live agent sees the compacted version.
- **New contributor friction.** Also, the project auto-closes PRs and issues from new contributors by default. Maintainers review them daily, but it's not the most welcoming onboarding.
- **npm install quirks.** The `--ignore-scripts` flag is required during global install. But Pi's own docs say this up front, so it's manageable.
## The Bottom Line
So here's my take: Pi Agent Harness is the open-source coding agent the community has been waiting for. And it's not a Claude Code clone — it's a genuinely different take on what a coding agent CLI should be: provider-agnostic, extensible by design, and built with a session model that matches how developers actually work.
But the 64K stars aren't hype. They're developers who tried it, stayed, and started building on top of it. So if you're looking for a coding agent that doesn't lock you into one ecosystem, Pi is your answer.
And honestly? At this rate, it's not "an alternative to Claude Code" anymore. It's the benchmark.