Code mode isn't about MCP: it's about whether tool results go to context or program variables
ritakozlov · x · 2026-11-05
Boris Tane of Polylane breaks down "code mode": instead of asking a model to call tools one at a time, give it a single tool that runs code and expose all other tools as functions callable from that code. The model writes a small program, the program calls the tools, and only the return value goes back to the model.
Key points:
- Code mode has mostly been framed as a better way to use MCP servers, but it has nothing to do with MCP — it's a decision about where tool results go: into the model's context, or into variables of a program the model wrote. Polylane's agent makes that choice for most of its tool calls
- Traditional tool calling appends the full result to the conversation: asking why CI is failing gets back 15 full workflow-run objects, followed by multiple sequential calls for each failed run's jobs, ballooning context
- Illustrated with diagrams contrasting the classic loop vs code mode
A worthwhile architecture-level read for agent builders.
More from coding & agent
- Dev finds pi coding tool defaults to Opus 4.8 on a fresh install — lucasmeijer · 2026-11-05
- Kylon puts whole teams and agents in shared rooms, with a Neon branch per app draft — jefrankle · 2026-11-05
- "Evals > vibes": agent workflow debates are just guessing without eval stats — annetgriffin · 2026-11-05
- OpenAI hackathon winner joins YC, launches Raven, an agent-first phone — ycombinator · 2026-11-05
- Open-source Cicada brings real-time translation and AI meeting notes to any Mac call, free 50h/month — dotey · 2026-11-05
- IBM launches AI coding assistant named "Bob", devs can't stop laughing — zeeg · 2026-11-05