Building Pi in a World of Slop

Building Pi in a World of Slop — Mario Zechner

Mario Zechner · AI Engineer Conference · ~18 min · Deep Dive
Video thumbnail — Building Pi in a World of Slop
⏱ ~18 min 🎤 Mario Zechner 🏷 Pi Agent · OSS · Agent Philosophy · Extensions · Context Control · Coding Agents

1 Act 1 — Why I Left Claude Code

▶ 0:29

Mario opens with genuine respect for the Claude Code team — "brilliant people, talented, super high velocity, they created the entire game" — before explaining why he stopped using it:

  • My context wasn't my context — Claude Code controls what goes into the context behind your back. The system prompt changes on every release. Tools get removed or modified. "System reminders" get injected at inopportune places telling the model information that "may or may not be relevant."
  • Zero observability — no visibility into what the agent is actually doing
  • Zero model choice — it's the native Anthropic harness, locked to Claude
  • Almost zero extensibility — hooks are shallow and spawn new processes for every trigger
  • Constant breakage"If my hammer breaks every day, I'm getting really mad." High velocity + more features = more bugs

2 Looking at Alternatives

▶ 3:09

Mario surveyed the landscape. He calls Amp and Factory/Droid the "Porsche and Lamborghini of coding agent harnesses" — great if you can afford them.

He then looked at OpenCode, another open-source option with a "brilliant team." But under the hood, he found problems:

  • Context pruning — tool outputs get silently pruned after a minimum token count, "which basically lobotomizes the model"
  • LSP injection — after every edit, errors are injected into the tool result. "You don't write one line, check errors, write another line. You finish your work, then check."
  • Session storage — each message saved as a separate JSON file on disk
  • Security — default server setup with CORS headers allowing any browser tab to access it

3 The Terminal Bench Thesis

▶ 4:24

Mario discovered Terminal Bench — a coding agent benchmark that gives the model just two capabilities: send keystrokes to a tmux session and read its output. No file tools, no sub-agents, nothing fancy.

And it's one of the best-performing harnesses on the leaderboard. Across model families, it scores higher than most native harnesses.

💡 Thesis 1: "We are in the fuck around and find out phase of coding agents. Their current form is not their final form."
Thesis 2: "We need better ways to fuck around." — Self-modifying, malleable agents that the agent itself can modify.

4 Pi's Architecture — Radical Minimalism

▶ 5:46

Pi ships as four packages:

  1. pi-ai — provider abstraction + context handoff between providers
  2. pi-agent-core — "just a while loop and the tool calling"
  3. pi-tui — bespoke terminal UI framework (from his game development background — "actually doesn't flicker too much")
  4. pi-coding-agent — the agent itself

Four tools: read, write, edit, bash. That's all.

The system prompt? Mario shows it on screen to laughter from the audience. It's just a few lines. Then skills were added (markdown files) — "begrudgingly, we had to add a couple more lines."

💡 "Models are RL-trained up the wazoo. They know what a coding agent is because the agent harness is basically what they're trained on. You don't need 10,000 tokens to tell them 'you're a coding agent.' They know."

5 The Self-Modifying Agent

▶ 6:37

Here's the key innovation: Pi ships with its own documentation and extension code examples. All you need to tell the agent is: "Here's the documentation. Here's some code that shows you how to modify yourself by writing extensions."

The agent can then build its own extensions — sub-agents, MCP support, plan mode, whatever you need. You describe what you want, Pi writes the extension, and you hot-reload during the session.

6 YOLO Security — Give Them Rope

▶ 7:27

Pi is YOLO by default — no approval dialogs for bash commands. Mario's reasoning: "I don't think a little dialogue that pops up every time you call bash is a smart security mechanism."

Instead, Pi gives you so much rope that you can build whatever security mechanism fits your specific needs. Different users have different security requirements — a one-size-fits-all approval dialog is theater, not security.

What Pi deliberately doesn't include built-in: sub-agents, plan mode, MCP support. "I'm a heathen." But if you want them, ask Pi to build them as extensions.

7 Extensions & Packages

▶ 8:10

Extensions are TypeScript modules — in the simplest case, a single .ts file. They can: register tools, add slash commands, define shortcuts, listen to events, save state in sessions, do custom compaction, add custom providers, and fully control tools.

Community examples shown:

  • Anthropic's /by-the-way side-quest feature — someone built it for Pi in 5 minutes with more features
  • A chat room for Pi agents that talk with each other (custom UI included)
  • NES games running inside Pi
  • Doom running inside Pi

Everything bundles via npm or GitHub — "We don't need to reinvent another bunch of silos called marketplaces. We already have package managers." And everything hot-reloads during a session.

💡 "How do you build a Pi extension? You don't. You tell Pi to build it for you based on your specifications and then you just iterate with it and hot-reload during the session."

8 Act 2 — OSS in the Age of Clankers

▶ 10:18

When Peter put Pi inside OpenClaw as its agentic core, Mario's open-source project became the target of thousands of AI-generated garbage issues and PRs. Half his tracker was OpenClaw instances posting nonsense.

Mario's countermeasures

  • Auto-close all PRs — with a comment asking for a human-written issue in under a screen of text
  • Vouch system — write "looks good to me" on a human's issue and their username gets allowlisted for future PRs
  • Clanker labels — OpenClaw-related issues get deprioritized
  • 3D embedding visualization — cluster similar issues in 3D space to spot bot patterns
  • Office hours — just close the tracker whenever you want, "so I have my life back"

"Clankers don't read the comment. They don't go back once they posted a PR. So that's a perfect filter."

9 Act 3 — Slow the F*** Down

▶ 12:04

The most passionate section. Mario on products "100% built by agents": "Yes, we know it sucks now. Congratulations." (Receives the biggest applause of the talk.)

His analysis of why agent-heavy development fails:

  • Agents compound errors with zero learning — no bottlenecks, no pain, delayed consequences
  • One human produces X errors/day. Ten agents produce 100X — how many can you review?
  • "But I have a review agent" → "Let me introduce you to the wonderful world of the ouroboros." It catches some issues, but agents reviewing agents is circular.
  • Models learned from our old garbage code — 90% of code on the internet is garbage. That's what fills in the blanks.
  • Every agent decision is local — especially in large codebases that don't fit in context
  • Enterprise-grade complexity in 2 weeks — abstractions, duplication, backwards compatibility, defense in depth
  • "But my detailed spec""A sufficiently detailed spec is a program." Blanks get filled with internet-learned mediocrity.
⚠️ "Agents will happily keep shitting into your code base." — Humans feel pain and eventually refactor. Agents have no pain signal.

10 How We Should Work with Agents

▶ 16:16

Mario's practical framework:

Good agent tasks

  • Well-scoped — agent guaranteed to find everything it needs
  • Evaluable — you can give it a function to measure success (hill climbing, auto-research)
  • Non-mission-critical — boring stuff, let it vibe
  • Reproduction cases — partial user issue reports → let the agent reproduce
  • Rubber ducking — if no human is nearby

The final plea

  • Slow down — think about what you're building and why
  • Learn to say no — "your most valuable capability right now"
  • Fewer features, polished — use agents to polish, not to generate
  • Cap generated code that needs review
  • Non-critical code: vibe. Critical code: read every line.
  • Important code: write it by hand. Use agents as assistants, not decision-makers.
  • The friction builds understanding — "that's where you learn new things"
💡 "All of this requires discipline and agency. And all of this still requires humans."

🎯 Key Takeaways

🔑 Key Takeaways

  • Your context should be your context — Claude Code and other harnesses modify context behind your back with system reminders, tool changes, and prompt updates you can't control
  • Minimal harnesses outperform complex ones — Terminal Bench (tmux keystrokes only) beats most native harnesses on benchmarks
  • Pi has four tools: read, write, edit, bash — and a system prompt so short it gets laughs. Models are already RL-trained as coding agents.
  • The self-modifying agent — ship docs + examples, tell the agent "here's how to modify yourself." It builds its own extensions.
  • Extensions are TypeScript + hot reload — develop during the session, see changes immediately. Distribute via npm, not custom marketplaces.
  • YOLO security is honest security — approval dialogs are theater. Give users rope to build their own security mechanisms.
  • Clankers are destroying OSS — AI agents flood issue trackers with garbage. Auto-close + vouch system + office hours is the current best defense.
  • Agents compound errors without learning or pain — humans hit a threshold and refactor. Agents keep going.
  • A sufficiently detailed spec IS a program — blanks get filled with internet-learned mediocrity
  • Enterprise-grade complexity in 2 weeks — what ten agents and two humans can produce if unchecked
  • Critical code: read every line. Important code: write it by hand. Friction builds understanding.
  • "All of this still requires humans."

🔗 Resources & Links

Timestamp Index

▶ 0:14 Introduction — a tragedy in three acts
▶ 0:29 Act 1 — why I left Claude Code
▶ 1:55 Context control — "my context wasn't my context"
▶ 3:09 Alternatives — Amp, Factory, OpenCode
▶ 4:24 Terminal Bench — minimal harness, top results
▶ 5:46 Pi architecture — 4 packages, 4 tools, tiny prompt
▶ 6:37 Self-modifying agent — docs + examples = agent writes own extensions
▶ 7:27 YOLO security & what's not built-in
▶ 8:10 Extensions — TypeScript, hot reload, npm
▶ 9:37 Community — NES, Doom, chat rooms
▶ 10:18 Act 2 — OSS vs. clankers (AI-generated garbage PRs)
▶ 12:04 Act 3 — "slow the f*** down"
▶ 14:01 Enterprise-grade complexity in 2 weeks
▶ 16:16 How we should work — scope, evaluate, finalize
▶ 18:02 "All of this still requires humans."