Pi 2.0 (Codemode, Durable Tools & More!): Native via Codemode, Custom Model Routing & Pi Durable
In this video, I'll go through the Pi 1.0 release from Earendil and the new Pi Durable package. We'll start with native MCP support through Codemode, where the agent writes small JavaScript programs that call tools, combine results, and send back only what's useful, plus the specialist models it can reach, like the Jev classifier and image generation. Then I'll cover virtual models for custom model routing, deferred tool loading, cache warming, mid-conversation system messages, the new system theme, and fullscreen mode becoming the default, along with the smaller changes in the final release. Finally, I'll explain Pi Durable for long-running agent applications, how to install Pi, and what it actually costs to run. -- Key Takeaways: 🚀 Pi 1.0 shipped on October 1 with native MCP support through Codemode, custom model routing, deferred tool loading, cache warming, and a refreshed terminal interface. 🧠 Codemode lets the agent write a small JavaScript script that calls tools in parallel and returns only the useful output, so intermediate data stays out of the model's context. ⚠️ Scripts run in a sandbox, but the tools they call keep their own permissions, and tool calls made before a failure are not undone. 🔍 Jev answers typed questions with probabilities and image models generate images through Codemode, but generated images are not saved to disk unless your workflow saves them. 🔀 Virtual models let an extension route each request to a different physical model, and Pi shows the routed model and cost per model in /session. 💸 Routing has tradeoffs: switching models can lose prompt-cache reuse and a classifier adds latency, so compare against a single-model baseline on real tasks. ⚡ Cache warming only refreshes when Pi estimates at least five cents in avoided cache-miss cost, and the refresh usage counts toward your session totals. 💻 The new system theme builds Pi's colors from your terminal's palette, and fullscreen is now the default, with regular mode available through /settings or --tui-mode regular. 📊 The team reports a GPT-5.6 request with default tools and Codemode drops from about 5,300 to 3,300 prompt tokens, which is about 40% in that specific setup. ✅ Pi Durable is an experimental, MIT-licensed foundation for long-running agent apps with checkpoints and resumable tasks; it's a strong release if you like shaping your own coding agent.