The lede
What is Codemode
Armin Ronacher
Ronacher's clearest explanation yet of why harnesses are starting to hand the model a JavaScript sandbox rather than another twelve tools, and the distinction he draws is the useful part: codemode runs in the harness, inside QuickJS inside WASM with no network and no filesystem, which puts it on the other side of the line from the bash tool that runs in your actual environment. The payoff is batching that doesn't destroy context — a regular tool call truncates its output at around two thousand lines, while a codemode script can fan out with `Promise.all`, keep the structure, and leave state in the transcript for its next invocation. His examples are the convincing bit: probe five or ten items by hand, then write a script that processes the remaining few hundred, or run a thirty-step control loop where a classifier decides each move. The complaints are worth reading if you maintain an MCP server, because they are all about you: no `outputSchema`, result formatting that changes shape between batch sizes, binary data that has to travel as pre-signed URLs, and double JSON-escaping when codemode calls a server that is itself running codemode. He also notes the thing nobody has solved — durability — and suggests borrowing snapshotting from durable workflow engines, which is a fair description of where this all has to end up.