# If you don't run Pi locally you're falling behind…
<!--
ref: @content/youtube/david-ondrej/2026-06-12-pi-agent-complete-course-orchestrator-setup
version: 3
updated_at: 2026-10-31T20:15:49.228Z
-->

David Ondrej (2026-06-12): Ondrej's organizing distinction is **product versus harness**. Claude Code and Codex are mass-market products — opinionated, feature-heavy, and wrapped in guardrails because they serve tens of millions of people.

*Synthesized from David Ondrej on David Ondrej, 2026-06-12.*

David Ondrej delivers a full course on Pi (pi.dev), the minimal agent he now uses more than Claude Code or Codex, built from daily use and conversations with its creator, Mario.

## Core Thesis

Ondrej's organizing distinction is **product versus harness**. Claude Code and Codex are mass-market products — opinionated, feature-heavy, and wrapped in guardrails because they serve tens of millions of people. Pi is a harness: four tools, a roughly **1,000-token system prompt** (10–15x smaller than competitors, and tokens you pay for on every call), and nothing else. The value proposition is that you adapt the agent to your workflow rather than the reverse, and the skill that separates people who abandon Pi in two days from people whose Pi compounds is knowing its four extension layers.

## Key Insights

- **Install is a one-liner curl from pi.dev**, roughly 20 seconds. `/login` opens provider selection — Pi supports over **15 providers** and thousands of models, against Codex and Claude Code's single-vendor lock. Ondrej funds OpenRouter with **$5–10** and caps the key at **$30**.
- **The four built-in tools are read, write, edit, and bash** — and bash is the one that matters, because terminal access means Pi can install packages, manage files, open and close applications, inspect the network, and do anything a developer with shell access could. Ondrej's argument is that this is *sufficient*: you do not need dozens of MCPs, hundreds of prebuilt skills, or plugin sprawl.
- **Context comes from three markdown files.** `system.md` overrides the entire system prompt — he advises leaving it alone. `append-system.md` appends to it every session and is where most personalization belongs. `agents.md` can be global or per-folder for project-specific context. Pi also reads existing `CLAUDE.md` files, so an established Claude Code project works immediately.
- His own `append-system.md` carries small, high-frequency items: concise responses, no emojis, a preferred date format, his location, and one that solves a real annoyance — an instruction that he cannot see tool or bash output, so results must always be relayed in text.
- **Web search is not built in.** The `pi-web-access` package (~**90,000 downloads/month**) adds it, runs on Exa, and is free. Ondrej installs it by telling Pi to install it, which is his general pattern: use the agent to improve the agent.
- **The four improvement layers, in ascending power and cost**: `agents.md` (always-on context, seconds to change), prompt templates (slash commands, ~30 seconds), skills (auto-loaded when relevant, one to two minutes), and extensions (real TypeScript, working as hooks — hardest to write, so usually installed from others).
- **`/reload` is required after any config change** — new prompt templates, skills, keybinds, and themes do not take effect until you run it.
- **His most-used prompt template is `/short`** — "make your answer simpler and shorter." He was typing that 20–40 times a day before templating it.
- **He runs 50+ skills, roughly 85% self-written**, most created within the previous 30 days. He names `research-prompt` as one worth copying: it turns a casual question into a highly optimized prompt for a long-running deep-research tool. A purple "skill" indicator in the transcript is how you confirm a skill actually loaded.
- **Two distinct steering keys**: Enter interrupts and redirects immediately after the current tool call — for when you can see it going the wrong way. **Option/Alt+Enter queues** a follow-up to fire when Pi finishes, and you can stack two or three ahead.
- **`/compact` takes two to three seconds**, against roughly a minute in Claude Code — which is why he actually uses it. He watches the context percentage in the status bar and compacts around 30–50%, noting every model degrades at 90% context versus 5–15%.
- **The status bar carries**: token counts, session spend, context percentage, auto-compaction state, model creator, model name, and reasoning effort. **Shift+Tab cycles effort** through off, minimal, low, medium, high, and extra high — he lives on extra high.
- **Pi is always in YOLO mode** and never asks permission. Ondrej's position is that this is a skill issue, not a defect, but it carries a hard prerequisite: **do not run Pi on cheap models** — he names Haiku and Gemini Flash explicitly. For anyone uncomfortable with that, the `pi-permission-system` package (~**17,000 downloads/month**) restores approvals.
- **There are no sub-agents, by design.** Mario's recommendation is to spawn parallel Pi instances in tmux or cmux instead — simpler, transparent, and fully under your control, versus Claude Code sub-agents where Ondrej says you often can't tell what one is doing or why.
- **The workflow he rates highest is Pi orchestrating Codex.** Pi is the personal agent that holds your context and conversational preferences; Codex CLI is the coding actor. Pi can read cmux panes, spawn and kill them, SSH into a VPS and launch Codex there, and poll every 5–25 seconds. The cost structure is the point: Pi burns almost nothing because it only reads outputs, while the bulk of tokens go through Codex on a ChatGPT subscription he's already paying for. He calls the **$100 ChatGPT plan the highest-value $100 in AI**.
- **The deeper argument for orchestration is reading speed.** Understanding what four parallel coding agents are doing would take a human a long time even at 2,000 tokens each; a model reads that roughly 100x faster. So you state the desired end outcome to one agent and let it manage the rest.
- **Sessions are trees, not linear chats.** Escape once interrupts; Escape twice opens history. Editing any earlier user message branches the conversation rather than overwriting it, and both branches remain live — closest analogy is git worktrees. `/fork` promotes a branch into its own session file.
- **Session files are portable JSONL**, so they can be piped, shared, or processed by your own tooling. `/share` produces a gist and a URL showing chat history alongside outputs — useful for showing a teammate how you got somewhere. `/resume` lists prior sessions, including forks, and is the equivalent of chat history.
- **Pi is deliberately anti-MCP.** The whole course covers no MCP servers. When you genuinely need one, wrap it as a CLI tool — `mcp-border` exposes MCP calls as shell commands that Pi runs through bash, and a `pi-mcp-adapter` community extension proxies servers and loads their tools directly. Otherwise direct CLI tools are the better answer.
- **His debugging loop for Pi itself, demonstrated live on a broken `/share`**: paste the error (Ctrl+V for screenshots, not Cmd+V), describe what went wrong, tell it to search the web, and explicitly instruct it to make no changes yet. It traced his failure to a `matrix` theme referenced in settings but not installed.

## Actionable Takeaways

1. Install from pi.dev's curl one-liner, run `/login`, pick a provider, and set a spend cap on the key before pasting it.
2. Put personalization in `append-system.md`, never `system.md`. Include the instruction that you cannot see raw tool output and results must be relayed as text.
3. Install `pi-web-access` first — Pi has no search until you do. Have Pi install it rather than running the command yourself.
4. Template any prompt you type more than once a day, then run `/reload` — templates do not register until you do.
5. Learn two keys: Enter to steer mid-run when it's going wrong, Option/Alt+Enter to queue the next two or three instructions while it works.
6. Watch the context percentage and `/compact` around 30–50%; it costs two seconds and every model degrades near the context ceiling.
7. Only run frontier models in Pi. YOLO mode plus a cheap model is how you lose a folder. If that's unacceptable, install `pi-permission-system`.
8. Build the orchestrator pattern: Pi in one cmux pane driving two Codex CLI instances (`codex --yolo`) in others, with Codex on GPT-5.5 medium fast in fast mode. Talk only to Pi; state the goal, not the steps.
9. Use `/fork` when you want to explore an alternative direction from a known-good point, and `/share` to hand a teammate the full reasoning trail instead of a conclusion.
10. Skip MCP unless you must; wrap the server as a CLI tool with `mcp-border` and let bash call it.

## Notable Quotes

> "You should adapt pi to your workflows, not the other way around." — David Ondrej, quoting pi.dev

> "You, the human, are the limiting block." — David Ondrej

> "Anytime you find yourself repeating the same prompt more than once a day, create a prompt template for it." — David Ondrej

> "Pi agent is always in YOLO mode. So it will never ask you for permissions." — David Ondrej

> "Stop being a watcher and start being a doer." — David Ondrej

---

*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*

*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*