Pi Agent: The Minimal Harness That Became My Multi-Tool Glue Pi Agent, a minimal coding harness created by Mario Zechner, has become the glue between heavier tools like Claude Code, Codex, and Gemini CLI for a developer who runs four coding agents daily. Its sub-1000-token system prompt and 'primitives not features' philosophy—offering only read, write, edit, and bash tools—reduce context overhead and allow switching models mid-session. The tool's deliberate omissions, such as no MCP support and no permission prompts, are credited with making it a low-friction option for quick tasks and extension authoring. On this page Pi Agent: The Minimal Harness That Became My Multi-Tool Glue After 2 months switching between Claude Code, Codex, Gemini CLI, and Pi Agent for different coding tasks, Pi's 'primitives not features' philosophy turned it into the connective tissue between heavier tools. I run four coding agents daily. Claude Code https://claude.ai/code for planning and implementation. Codex https://github.com/openai/codex for review loops. Gemini CLI https://github.com/google-gemini/gemini-cli now Antigravity for frontend-heavy visual work. And for the past two months, Pi Agent https://pi.dev/ has quietly become the one I reach for when none of the others fit. Not because Pi does more. Because it does less. The problem is the spaces between these tools. The moments when you need a coding agent but don’t want 10,000 tokens of system prompt or 47 permission dialogs. Pi fills that gap. What Pi Actually Solves The problem isn’t “we need another coding agent.” We have plenty. The problem is that every existing harness assumes it’s the only tool you use. %%{init: {"layout": "dagre"}}%% flowchart TD subgraph problem "The Sealed-Harness Problem" A Claude Code -- |locked to Anthropic| X Vendor lock-in B Codex -- |locked to OpenAI| X C Gemini CLI -- |locked to Google| X X -- Y Can't mix models mid-task X -- Z Context overhead per session end subgraph solution "Pi's Answer" D Minimal core: 4 tools, <1000 tokens -- E Any provider, any model E -- F Switch mid-session D -- G Zero permission friction D -- H Self-extending via TypeScript end problem -.- |"Pi bridges the gaps"| solution Claude Code injects thousands of tokens of system prompt on every turn. Codex adds its own orchestration overhead. Gemini CLI brings Google’s safety layers. Each tool makes assumptions about what you need, and those assumptions cost context tokens. Pi’s thesis: the models already know how to code. They’ve been RL-trained for it. Give them read , write , edit , bash , and get out of the way. The Multi-Tool Reality Nobody Talks About Most agent content assumes you pick one tool and commit. That’s not how production workflows actually work. | Tool | Where I Use It | Why | |---|---|---| | Claude Code | Planning Opus , implementation Sonnet + Haiku sub-agents | Deep context, extended thinking, workflow orchestration | | Codex | Code review, system improvement loops | Anti-gravity mode, iterative refinement | | Gemini CLI | Frontend generation, slide decks, video templates | Long context 1M+ , multimodal input, visual reasoning | | Pi Agent | Glue tasks, quick explorations, extension authoring | Sub-1000 token prompt, zero friction, model flexibility | The switch points matter: php %%{init: {"layout": "dagre"}}%% flowchart LR Task New Task -- Decision{What kind?} Decision -- |"Architecture, deep reasoning"| CC Claude Code + Opus Decision -- |"Review loop, iterative improvement"| CDX Codex Decision -- |"Frontend visual, HTML gen, slides"| GEM Gemini CLI Decision -- |"Quick, multi-model, custom tooling"| PI Pi Agent CC -- Done Ship CDX -- Done GEM -- Done PI -- Done The diagram tells the full story. The part it doesn’t show: heavyweight agents add context overhead that actively hurts simple tasks. Pi’s entire system prompt and tool definitions fit in under 1,000 tokens. More context window goes to actual work. Why “Primitives Not Features” Actually Works Pi’s creator, Mario Zechner, made a series of contrarian choices that sound wrong until you use them daily: - No MCP support - No sub-agents - No plan mode - No background bash - No built-in to-dos - No permission prompts Each of these is a deliberate subtraction. And each one forces you into a pattern that’s actually better. No MCP: Progressive Disclosure via CLI Tools MCP servers like Playwright 21 tools, 13.7k tokens or Chrome DevTools 26 tools, 18k tokens dump their full tool descriptions into every session. That’s 7-9% of your context window gone before you type a single character. Pi’s alternative: build CLI tools with README files. The agent reads the README only when it needs the tool: %%{init: {"layout": "dagre"}}%% sequenceDiagram participant User participant Pi participant Tool as CLI Tool User- Pi: "search the web for X" Pi- Pi: reads ~/.pi/tools/websearch/README.md Pi- Tool: websearch "query" via bash Tool-- Pi: results Pi-- User: summarized answer Note over Pi: Token cost paid ONLY this turn This is progressive disclosure applied to agent tooling. You pay for what you use, when you use it. Compare that to MCP dumping 13k tokens into every single session whether you search the web or not. No Sub-Agents: Full Observability In Claude Code, sub-agents are black boxes. You see the output but not the reasoning, not the context gathering, not the missed files. Pi’s approach: spawn yourself via bash. --- description: Run a code review sub-agent --- Spawn yourself as a sub-agent via bash to do a code review: $@ Use pi --print with appropriate arguments. Pass a prompt asking it to review for bugs, security, error handling. Report the sub-agent's findings. The output streams to your terminal. You see everything. If the sub-agent misses something, you know immediately because you’re watching the full output, not a summary. No Background Bash: tmux Instead Background process management in coding agents is a solved problem. It’s called tmux https://github.com/tmux/tmux . Pi can start a dev server in tmux tmux new-session -d -s devserver 'npm run dev' Check output later tmux capture-pane -t devserver -p List all sessions tmux list-sessions You get observability for free. You can hop into the session yourself. And after context compaction, the agent can still query tmux list-sessions to find its running processes. No special tooling needed. Beyond Coding: Pi as a Generalized Agent Here’s something most people miss about Pi. It’s marketed as a “coding agent,” but the architecture is completely general-purpose. The core is just: take a system prompt, give the model tools, run a loop until it’s done. Swap the tools and system prompt, and you have a different agent entirely: %%{init: {"layout": "dagre"}}%% flowchart TD subgraph core "Pi Core unchanged " A Agent Loop B Tool Dispatch C Event Stream D Session Management end subgraph configs "Different SYSTEM.md + Extensions" E "Coding Agent