Why Agents Are Soon Only Going to Have 1 Tool

Open original

The article argues that agent harnesses are collapsing large tool catalogs into a single exec(code) tool, where the model writes a script that chains actions in a sandbox instead of calling tools one turn at a time. It covers why this helps and what it changes about how tools need to be designed.

  • Standard tool calling is one action per turn, so chained workflows burn round-trips and context; Code Mode lets the model script dependent steps, loops, and parallel calls in one pass.
  • Only the final summary returns to the context window; intermediate payloads stay in the sandbox, which the author ties to context savings and cost reductions (Factory reported a 15% drop in model spend and a +3.5 point Terminal-Bench gain after switching Droid to Code Mode).
  • Typed interfaces, a credential and policy bridge, and persistent state outside the prompt make a JS or Python sandbox more practical than bash, though existing CLIs and skills may need rework to fit.

Instead of giving a model one tool per action and waiting for a result after every step, the newer approach, called Code Mode or Programmatic Tool Calling, gives the agent a single tool, exec(code). The model writes a short TypeScript or Python script that chains calls, runs them in parallel with Promise.all, handles errors with try/catch, and filters results in memory inside an isolated sandbox. Only a final summary goes back into the context window. The author's example: a script that lists a PR's files, keeps the TypeScript files with more than 50 additions, runs a security scan on just those, posts a comment, and returns one line of text. None of the intermediate payloads ever touch the prompt history. The shift is possible largely because frontier models are now heavily trained on code, and because MCP servers increasingly publish outputSchema alongside inputSchema, so the model knows return types before it runs anything. The article argues this beats both plain tool calling and bash-based tool use for several reasons. Standard tool calling forces one action per turn, so a research task that needs fetching, reading, and cross-referencing burns three round trips, each re-sending growing context. Bash has its own problems: agents waste turns running --help across subcommands, shell output is text-only so an image cannot be attached to the next turn, and string escaping is fragile. A typed runtime gives the model a contract upfront, lets a host bridge inject credentials or require confirmation on destructive calls, and offers a key-value store so large query results can live outside the context window. The author also points to adoption: Factory moved its Droid 1.0 agent to Code Mode and reported a 3.5-point gain on Terminal-Bench and a 15% cut in model spend, and harnesses like OpenAI Codex, Pi, Pydantic AI, LangChain, and Cloudflare's Agents SDK either default to or support the pattern. The author is cautious about the headline. Not every agent will end up with one tool. The practical catch is that many existing tools, CLIs, and Agent Skills were built for bash and human-readable output, so they won't drop into a typed sandbox cleanly. Teams experimenting with this will likely need to audit what their agents actually use and rework interfaces accordingly.

Ask about this article