Claude Code vs Pi: Built-In Guardrails and Sub-Agents on Claude Models vs a Minimal MIT Harness on Many Providers
Claude Code
Anthropic's agentic coding tool for the terminal, IDE, desktop app and browser
Pi
A minimal, extensible, MIT-licensed agent harness for coding and beyond
Verdicts by Task
Auto mode (a separate classifier model) is the built-in starting permission mode in terminal and VS Code sessions, Manual mode starts read-only and asks first, and a bash sandbox with filesystem and network isolation is built in.
The sandbox is unavailable on native Windows. Built-in file tools, command hooks and local MCP servers run outside it, and we tested neither product.
Pi's providers page lists many providers and its models page covers llama.cpp, Ollama, LM Studio, vLLM and SGLang; Claude Code's model-config page lists Claude models only.
Claude Code can route Claude through Bedrock, Foundry, Google Cloud's Agent Platform or an LLM gateway.
Claude Code documents sub-agents, background agents and plan mode; pi.dev says Pi includes neither.
Agent teams are off by default and use about 7x the tokens in plan mode per Anthropic's costs page; Pi users can spawn Pi instances through tmux or build their own with extensions or packages, per pi.dev.
Pi is MIT licensed with no paid plan on the pages we read; Claude Code is included from the $20 Pro plan or billed by API tokens.
Pi still needs a model subscription, key or local hardware, and we have no measured spend for either tool.
Claude Code lists VS Code, JetBrains, desktop and web surfaces; Pi's 20-page docs index lists none of these.
Pi runs in a terminal, over RPC or the TypeScript SDK, and we did not read its extension pages.
Claude Code documents cloud scheduled tasks that keep running when your computer is off, desktop scheduled tasks and `/loop`.
Session-scoped scheduled tasks (such as /loop) fire on their interval and send your full context even while the session is idle, per the costs page; Pi's 20-page docs index lists no scheduling page, but extensions may add one.
Feature Comparison
| Dimension | Claude Code | Pi |
|---|---|---|
| AI-native | AI-Native | AI-Native |
| What it is | Claude Code is "an agentic coding tool that reads your codebase, edits files, runs commands, and integrates with your development tools. Available in your terminal, IDE, desktop app, and browser." | pi.dev calls it "a minimal agent harness"; the repository describes an "AI agent toolkit: unified LLM API, agent loop, TUI, coding agent CLI", MIT licensed. |
| Price | Pro: $20 a month, or $17 a month billed annually ($200 up front); Max from $100 a month; Team Standard seat $20 a month annual ($25 monthly), Premium $100 annual ($125 monthly); Enterprise "US$20/seat/month, billed annually, 20 seat minimum" plus usage at API rates. Pro and Max list "Claude Code included". The costs page says Claude Code "charges by API token consumption" and puts the enterprise average at around $13 per developer per active day and $150-250 per developer per month. | MIT licence; no pricing or paid plan on the pages we read. Models connect through a subscription, API key, local model or compatible endpoint, so model charges still apply. |
| Models | The model-config page lists Claude models (Fable, Opus, Sonnet and Haiku families) and routes through the Anthropic API, Amazon Bedrock, Microsoft Foundry, Google Cloud's Agent Platform, Claude Platform on AWS, LLM gateways and custom base URLs; the page we read does not describe non-Anthropic models. | pi.dev says "15+ providers, hundreds of models"; the docs providers table lists more than 30 providers including Anthropic, OpenAI, Google Gemini, DeepSeek, Mistral, Groq, xAI, OpenRouter and GitHub Copilot. Local models run through the llama.cpp router or Ollama, LM Studio, vLLM and SGLang endpoints. |
| Permissions and sandboxing | Auto mode is the built-in starting permission mode for interactive terminal and VS Code sessions and uses "a separate classifier model"; Manual mode "starts with read-only permissions" and asks before edits or commands. A sandboxed bash tool adds filesystem and network isolation via `/sandbox` (macOS Seatbelt; Linux and WSL2 bubblewrap; unavailable on native Windows). Built-in file tools, command hooks, local MCP servers and plugin monitors run outside that sandbox. In Manual mode the working-directory boundary is a permission prompt, so "a Bash command you approve can still write anywhere your user account can"; turning on /sandbox restricts Bash at the operating-system level. Among its best practices for untrusted content, the security page lists using virtual machines to run scripts and make tool calls, especially when interacting with external web services. | Pi "does not ask for approval before every tool call"; "After Pi starts, enabled tools still use the operating-system permissions of the Pi process"; "Project trust does not limit what tool calls can access or affect". Running Pi entirely inside a container, virtual machine, or sandbox is "usually the strongest practical option" on the security page; the containerization page covers plain Docker, Docker Sandboxes, OpenShell and Gondolin. |
| Sub-agents and planning | Sub-agents with "a lead agent" that "coordinates the work"; background agents; plan mode (Shift+Tab). Agent teams are off by default, and the costs page says they use "approximately 7x more tokens than standard sessions when teammates run in plan mode". | pi.dev says sub-agents are not built in (spawn Pi instances through tmux or build your own with extensions or packages) and plan mode is not included (write plans to files or build with extensions). |
| Extensibility | CLAUDE.md instructions, skills, hooks, MCP servers, plugins and an Agent SDK for custom agents. | Extensions, skills, prompt templates and themes, shareable as npm or git packages; pi.dev says "MCP is built in, and Codemode lets agents compose tool calls in a JavaScript sandbox"; extensions "execute inside the Pi process". |
| Where you run it | Terminal, VS Code, JetBrains, desktop app and web; cloud scheduled tasks that "keep running even when your computer is off"; Remote Control from a phone or browser; Slack routing. | TUI, print/JSON, RPC and SDK modes; docs pages for Windows, tmux and Termux on Android. The 20-page docs index we read lists no IDE, desktop, web or scheduling page. |
A finished product with many surfaces against a small toolkit you shape yourself
Pi's software is free under its MIT licence. Claude Code is included in paid Claude plans or billed per API token, Pi still needs a model subscription, key or local hardware, and we have no measured token comparison between them
Pi for choosing a provider or running locally. pi.dev says 15+ providers while the providers page table lists more than 30, so we state both and rely on neither
Claude Code ships approval modes and an OS-level bash sandbox; Pi leaves isolation to you. Pi's security page calls running Pi entirely inside a container, virtual machine or sandbox usually the strongest practical option, and Claude Code's pages also suggest a VM, container or sandbox runtime for extra isolation. We tested neither
Claude Code for built-in orchestration; Pi by design asks you to build it
Claude Code lists hooks, MCP servers, plugins and an Agent SDK; Pi lists extensions, skills, prompt templates and packages. Claude Code command hooks and local MCP servers sit outside its bash sandbox, and Pi extensions execute inside the Pi process, whose enabled tools use that process's operating-system permissions.
Claude Code covers more surfaces. Pi's RPC and TypeScript SDK modes suit embedding it in your own software
Still deciding between these two?
Choosing is the easy part. Getting it running inside your business, on your data, with your team using it, is the work. We do both.
The conversation runs on Gnosari, one of the tools in this directory. A real conversation, not a sales script.