OpenAI's Programmatic Tool Calling explained: models write code to orchestrate tools
solyarisoftware · x · 2026-09-12
Alessio Pomaro explains and tests OpenAI's Programmatic Tool Calling, a new way for agents to use tools more efficiently.
- Traditional tool calling loops each result back into context, inflating tokens, latency and steps in multi-tool workflows.
- The new approach: the model generates code that orchestrates multiple tools inside a secure runtime hosted by OpenAI — parallel calls, iteration, filtering and data aggregation run in code, without intermediate results entering the model's context.
- He tested it with a DataForSEO MCP server: the model auto-generated code to fire multiple MCP calls in parallel and collect results instead of invoking tools one by one.
- Anthropic described a similar idea earlier with MCP Code Execution: using code as an intermediate layer so deterministic work goes to a normal program, not the LLM.
More from coding & agent
- Codex quality fixes shipped, reset rolling out to ChatGPT Work users — CtrlAltDwayne · 2026-09-12
- Slack agents start telling each other to back off — paul_cal · 2026-09-12
- Understand-Anything hits 82k GitHub stars turning codebases into explorable knowledge graphs — tom_doerr · 2026-09-12
- dSebastien consolidates free Obsidian guides, 300-tool database and open-source AI skills — dSebastien · 2026-09-12
- Hutter Prize opens an agent swarm challenge to hunt for the ultimate compression algorithm — mervenoyann · 2026-09-12
- Ponytail, the 136k-star repo that makes AI agents write 54% less code — 4310sy · 2026-09-12