Armin Ronacher explains Codemode: why Pi 1.0 calls MCP tools via code, not tool schemas
mitsuhiko · x · 2026-10-06
Armin Ronacher (mitsuhiko) explains how Codemode, the new MCP support in Pi 1.0, follows through on his earlier thesis that agents should write code instead of loading tool definitions or MCP servers into context.
Key points:
- What tools really are: tool definitions become token structures server-side, and whether a model calls a tool is shaped by RL training.
- Why CLI/bash wins: calls compose easily, and models learn filesystem semantics during training — after echo foo > /tmp/test.txt the model "knows" the file exists.
- Bash's fundamental limit: it can only compose runnable programs, but some capabilities must be native LLM tools. viewimage requires the harness to inject the image payload into the protocol; cat can't do that.
- Sub-agents: spawning and orchestrating sub-agents is hard without harness-provided tools.
Codemode bridges the two worlds: the model writes code that invokes native tools, combining composability with capabilities that must be harness-injected.
More from coding & agent
- Same models, new harness: scores jump 23% to 62%, says Rajiv Shah — rajistics · 2026-10-06
- Harvey's rebuilt harness lifts 7-model average from 23.3% to 62.4% while cutting cost 60% — rajistics · 2026-10-06
- Dell expands AI Data Platform with semantic layer and knowledge graph to make data agent-ready — DavidLinthicum · 2026-10-06
- llmClassificR update brings full LLM text classification pipeline to pure R — GolinoHudson · 2026-10-06
- Small businesses quoted $30K for AI agents an experienced builder ships in weeks — Warm-Reaction-456 · 2026-10-06
- Open-sourced mishe-tauftauf: agent coordination that helped 3-person team ship 50k RPS DSP — Genaforvena · 2026-10-06