r/coding_agents • u/thehashimwarren • 5d ago
Code Mode is the biggest coding model innovation of 2026
I think "Code Mode" or programmatic tool calling could expand the use cases of what agents can realiably handle without a leap in model intelligence or compute.
To understand where we’re heading, it helps to look back at how we got here:
September - 2025
MCP made tools easier to connect, but every intermediate result could eat into the model’s context. Cloudflare’s proposal was to “Convert the MCP tools into a TypeScript API.” A script could carry data from one tool to the next and return only what the model needed to see.
- Cloudflare’s Code Mode announcement
November - 2025
The agent still needed to find the right tools. Anthropic showed how 58 tool definitions could consume 55,000 tokens before the conversation started. It paired Programmatic Tool Calling with Tool Search so agents could “discover and load tools on-demand.” Claude for Excel was already using programmatic calls on spreadsheets with thousands of rows.
February - 2026
Cloudflare put its entire API behind two MCP tools, `search()` and `execute()`, with about 1,000 tokens of tool definitions. The agent could look up the operations it needed and compose them in code.
September - 2026
OpenAI had shipped Programmatic Tool Calling in the Responses API in July. Financial research startup Rogo reported matching its quality rubric with 21% fewer input tokens in its evals. In September, OpenAI launched the Codex-powered Agents API, where agents could “filter or combine results in code.”
November - 2026
Claude Code announced Code Mode as “an experimental opt-in in which Claude writes JavaScript to call its tools.” Codex had Code Mode in its public codebase by March, and its model catalog now selects it automatically for GPT‑6.2‑Sol.
2
2
u/CCodeSI 4d ago
Agree on the direction. The part the timeline leaves out is what it does to permissions, which is where we'd expect the friction to land in coding agents specifically.
With one tool call per action, approval is easy to reason about: "allow git status", "ask before Edit outside src/". Once the model writes a script that calls ten tools in a loop, a single execute() bundles reads, writes and network calls together, and per-tool rules stop meaning much. So the approval has to move somewhere else:
into a sandbox around the script (which files it can write, which hosts it can reach), so the boundary holds no matter what the code does inside it, or
into the tool API itself, where each function the script can call is already safe or already scoped, which is basically sudo-visudo's point about interface design.
The other cost is debuggability. When a 40-line script fails on call 7, the transcript shows one opaque tool result instead of seven steps you can read. Returning a short per-call trace from the script (what it called, what came back, where it stopped) probably matters as much as the token savings for people who have to review what the agent did.
1
2
u/hieuphung97 3d ago
The token savings are massive in practice. We run tool chains inside a sandboxed JS runner so the model can batch four API calls, filter a 500-item JSON array, and return only three IDs. Turns five separate LLM roundtrips into a single deterministic turn.
2
2
u/blargargharf 3d ago
Codemode seems pointless if bot can run bash
1
u/Huge-Blueberry-4748 3d ago
Bash is another implementation of codemode.
Imagine that you have overridden `exec` or `rm` or `curl` command with your own implementation. So you can keep track of what the agent is doing, pause its execution for HIL approval, block bad parameters. Well, that's code mode.
What Codemode does better is how that override is implemented (generally cleaner). And since the codemode sandbox is serializable, you can have a fork-point that is synced between LLM convo state and sandbox state. You can do fancy things like grabbing data from multiple sources, then ask follow up questions. Then go back in time, LLM + sandbox would just be rewounded at will.
Pi Durable is a pretty clean implementation of this btw.
2
u/aldapsiger 1d ago
https://github.com/ethanhamilthon/tuse
this one uses codemode by default, single Lua tool, jsut a 1K system prompt by default, even though there are 20+ tool by default
3
u/sudo-visudo 5d ago
the real shift is that agent reliability depends more on your API than the model now. which comes down to interface design