Earendil released Pi 1.0 on October 1, 2026, introducing native Model Context Protocol (MCP) support alongside deferred tool loading and a JavaScript sandbox environment named Codemode. The update targets prompt token overhead in AI agent architectures, addressing setups where declaring all tool schemas in every system prompt inflates API costs and consumes context window space.
Three Tiers of Tool Visibility
Pi 1.0 replaces global schema exposure with three configurable visibility settings per tool:
Direct exposure keeps schemas continuously visible in the model prompt for high-frequency commands. Deferred exposure hides tool definitions until a task specifically demands them, catering to specialized APIs. Codemode keeps tool schemas completely out of the prompt context; instead, the model writes JavaScript code that runs inside a sandbox to call tools and aggregate results before updating the main context.
In a changelog scenario cited by Earendil, shifting multi-tool calls into the Codemode sandbox reduced a request's cold-start prompt size from approximately 5,300 tokens to 3,300 tokens, yielding roughly a 40 percent reduction.
Measurement and Server Limitations
Earendil highlights that harness-side sandboxing changes how tool calls are orchestrated but does not alter response formatting from upstream tools. Many existing MCP servers return unstructured text designed for full-prompt dumping rather than clean structured data.
To manage token budgets effectively, developers are advised to audit cold-start requests using provider tokenizers directly rather than relying on character estimations, which undercount punctuation-heavy schema syntax.
Authentication and Access Control
In addition to visibility settings, Pi 1.0 updates MCP authentication features. OAuth credentials are now stored per server name and endpoint URL, incorporating RFC 9207 issuer checks.
Restricting tool visibility provides a secondary security function alongside cost reduction. Excluding unused or legacy connectors from the active prompt window prevents the model from choosing improper tools or executing unrequested actions during complex turns.
AI-generated editorial illustration; not a documentary photograph.
Source: Your agent loads every tool schema by default. Decide which ones it should see.

Leave a Reply