
Backstory and Architecture of Pi

Building Pi, and what makes self-modifying software so fascinating
Topic 6 of 14
Published Apr 29, 2026 · Clip 32:13–45:18 (13:05)
Mario explains why he built Pi: he loved Claude Code's simplicity and agentic search, but soured as dogfooding added features and bugs, hidden context injections and system prompt changes broke his workflows. He reverse-engineered Claude Code's prompts, tried Amp and Open Code, but found them expensive or intrusive (e.g., LSP diagnostics after every edit). So he built Pi: a bespoke provider abstraction, a generalized agent loop with tool calling and streaming, a stable TUI, and a minimal core with many hook points loadable via TypeScript modules, enabling users to add tools, compaction, or even redesign the TUI — Pi can modify itself.