Short answer
Claude Code and Pi are both agent harnesses that run an agent to carry out tasks, and neither is simply better. Claude Code leans toward one of the broadest surface footprints and a first-party Agent SDK, with one engine and portable config across terminal, IDE, desktop, web, and CI. Pi leans toward radical minimalism and hackability: a tiny, auditable core you extend in TypeScript, with branching sessions. Which fits depends on your priorities: openness, surfaces, model, sandboxing, and how much you want to extend. And you do not have to choose permanently, because HarnessRouter runs both behind one API, so you can benchmark them on your own task and route each task to the one that measures best. Facts as of 2026-08-27.
- Claude Code (Anthropic): Anthropic's agentic coding tool, with one engine shared across a terminal CLI, IDEs, desktop, web, and CI, plus the Claude Agent SDK.
- Pi (earendil-works): an open-source, deliberately minimal and hackable coding-agent harness whose capabilities come from TypeScript extensions and skills.
- You can run both through HarnessRouter and route each task to the measured winner, rather than committing to one; every claim here was verified on 2026-08-27, and both ship fast, so re-check anything load-bearing.
What Claude Code and Pi each are
Claude Code is the harness from Anthropic: Anthropic's agentic coding tool, with one engine shared across a terminal CLI, IDEs, desktop, web, and CI, plus the Claude Agent SDK. Pi is the harness from earendil-works: an open-source, deliberately minimal and hackable coding-agent harness whose capabilities come from TypeScript extensions and skills. Both run an agent that reads and writes files, runs commands, and uses tools; the differences are in openness, surfaces, models, sandboxing, and how far each is meant to be extended. All facts here are from public materials, verified 2026-08-27.
The dimensions that actually separate them
These are the axes where the two genuinely differ; the side-by-side table below maps each one. Read them before the matrix so the differences that matter to you are in view.
- Licensing
- Proprietary product versus open source, and if open, whether it is the CLI or the whole harness.
- Models
- Which models each defaults to, and whether the model is configurable per task or tied to one vendor.
- Surfaces and reach
- Where each runs — terminal, IDE, cloud, desktop, chat — and how much of that shares one engine and config.
- Extensibility
- How far each is meant to be extended: built-in tools and config, skills, hooks, plugins, or a small hackable core you build on.
Claude Code and Pi, dimension by dimension
Each side described from its own public documentation. This is a factual map, not a scorecard, and neither column is marked a winner. Facts as of 2026-08-27.
| Dimension | Claude Code | Pi |
|---|---|---|
| Licensing | Proprietary product | Open source, MIT |
| Models | Claude Opus and Sonnet by default, with Haiku and Fable also selectable, configurable per task | Model-agnostic: a unified API across more than thirty providers |
| Surfaces | a terminal CLI, VS Code and JetBrains, desktop, web and mobile, and CI/CD, all sharing one engine and config | a terminal CLI, with an embeddable SDK and an RPC mode |
| MCP | An MCP client | Not built in by design; added through an extension |
| Sandboxing and permissions | permission modes (manual, auto, accept-edits, and more) with per-tool allow rules and workspace-trust gating | none built in by design; you run it in a container or add a sandbox extension, and it does not gate permissions for you |
| Extensibility | CLAUDE.md memory, skills, hooks, subagents, and a plan mode | a small core (read, write, edit, and bash) with everything else, including subagents and a plan mode, added as shareable TypeScript extensions and skills |
| Headless and programmatic use | a claude -p non-interactive mode with JSON and streaming JSON, plus the Claude Agent SDK in Python and TypeScript | a print mode, a JSON-lines event stream, RPC over stdio, and an embeddable SDK |
You can run both, and route each task to the winner
You do not have to choose. HarnessRouter runs both Claude Code and Pi behind one API, so you can benchmark them on your own task and route each task to the one that measures best. HarnessRouter is the world's first unified interface for agent harnesses. The harness is a parameter, not a commitment.
- Benchmark on your own task
- Run the same real task on both Claude Code and Pi through one API, on identical input, and compare them on success, cost, and latency instead of guessing from a listicle.
- Route per task class
- Send each kind of task to whichever harness measures best for it; the harness is a request parameter, so switching is largely a configuration change rather than a re-integration.
- Keep the contract open
- Both run behind the open Unified Harness Protocol, with an Apache 2.0 Community Edition you can self-host, so you can keep the protocol and deployment path open.
When to lean each way
- Lean toward Claude Code when
- You want one of the broadest surface footprints and a first-party Agent SDK, with one engine and portable config across terminal, IDE, desktop, web, and CI.
- Lean toward Pi when
- You want radical minimalism and hackability: a tiny, auditable core you extend in TypeScript, with branching sessions.
- When you are not sure
- Run both through HarnessRouter and let a benchmark on your own task decide, then route each task class to the one that wins.
FAQ
- Claude Code vs Pi: which is better?
- Neither is simply better; they make different trade-offs. Claude Code leans toward one of the broadest surface footprints and a first-party Agent SDK, with one engine and portable config across terminal, IDE, desktop, web, and CI, while Pi leans toward radical minimalism and hackability: a tiny, auditable core you extend in TypeScript, with branching sessions. A reliable way to decide for your work is to benchmark both on your own task, which HarnessRouter lets you do behind one API before you commit to either.
- Can I use both Claude Code and Pi?
- Yes. HarnessRouter runs both behind one API in per-run sandboxes, so you can call whichever fits each task, benchmark them head to head on your own input, and route each task class to the measured winner, with the harness as a request parameter rather than a separate integration.
- Is Claude Code or Pi open source?
- Claude Code: Proprietary product. Pi: Open source, MIT. Facts as of 2026-08-27; both projects move quickly, so re-check licensing before you rely on it.
- Is HarnessRouter affiliated with Anthropic or earendil-works?
- No. Claude Code is a product of Anthropic and Pi is a product of earendil-works; HarnessRouter is an independent runtime that can run both. Product and company names are used here only for identification and remain the trademarks of their respective owners.
Run Claude Code and Pi behind one API
Sign up, send the same task to both, and route each task class to whichever wins. The harness stays a parameter, the contract stays open, and the Community Edition is yours to self-host.
Start building on HarnessRouter
