> Paper > - Title: The Bitter Lesson of Tool Calling > - arXiv: 2608.06370 > - Authors: Ishan Patel, Sahil Sen, Elias Lumer, Vamse Kumar Subbiah > - Field: NLP / Tool Learning / Agents
Introduction: Two Craftsmen
The post opens with an allegory of two carpenters: one follows a rigid toolbox with fixed tools for fixed purposes (analogous to JSON tool calling), while the other improvises—repurposing any tool creatively for the task at hand (analogous to Programmatic Tool Calling, PTC). The debate between these paradigms mirrors the core tension identified in Rich Sutton's famous 2019 essay *The Bitter Lesson*.
Sutton's Bitter Lesson, Applied to Tool Calling
Sutton observed that over 70 years of AI history, methods relying on injected human knowledge (chess heuristics, hand-crafted visual features, linguistic syntax trees) were eventually surpassed by general methods that leverage massive computation—e.g., AlexNet beating feature engineering in 2012, Transformers displacing syntactic parsing, and AlphaZero mastering Go through pure self-play.
The paper asks whether this lesson applies to tool calling, a core LLM agent capability:
- JSON tool calling: Developers predefine tools (name, parameters, description). The model emits a structured JSON string, which the system parses and executes. Strengths: predictability, safety, compatibility with existing infrastructure. Weaknesses:
- Limited expressiveness — hard to express conditionals, loops, or parallel calls
- Poor composability — multi-step tasks require many sequential turns (inference cost, latency, context window consumption)
- Human knowledge over-injection — developers must anticipate all needed operations and workflows
- Programmatic tool calling (PTC): Tools are exposed as typed Python function stubs; the model generates code that can chain, parallelize, and conditionally invoke tools within a single execution. Benefits: native control flow, natural composition, fewer interaction rounds, and extensibility to unforeseen usage patterns. Challenges: sandboxing/security, harder debugging, higher demands on model code-generation ability.
- PTC matches or exceeds JSON on 11 of 14 models
- GPT-5.6 series: +10.6% improvement over the JSON baseline
- Parallel calls: PTC wins or ties on 13 of 14 models
- Context Rot: under noisy, lengthened contexts, JSON baselines degrade by an average of 2.3%, while PTC remains stable
- Safety-critical scenarios (finance, medical): JSON's strict constraints may be more controllable
- Simple single-call tasks: JSON's simplicity wins
- Legacy integration: migration costs may be prohibitive
- Sandboxed execution: container isolation (Docker, gVisor), resource limits (CPU, memory, network), syscall filtering, timeouts
- Tool exposure: typed Python stubs with type annotations and docstrings (crucial for model comprehension)
- Error handling: catch syntax/runtime/timeout errors, return feedback to the model for correction, cap retries
- Migration strategy: start with simple tools, keep JSON as a fallback, use hybrid modes, and A/B test in production on success rate, latency, cost, and satisfaction
- Patel, I., Sen, S., Lumer, E., & Subbiah, V. K. (2026). The Bitter Lesson of Tool Calling. *arXiv preprint arXiv:2608.06370*.
- Sutton, R. S. (2019). The Bitter Lesson. http://www.incompleteideas.net/IncIdeas/BitterLesson.html
Experimental Results on BFCL v4
The paper benchmarks PTC vs. JSON across 14 mainstream LLMs on the Berkeley Function Calling Leaderboard (BFCL v4):
Ablation Findings
1. Iteration is not the driver: Even when JSON-based agents are given loop/iteration capability, they do not reach PTC performance. The advantage comes from the code interface itself—control flow, variable binding, composability. 2. The gap grows with model generations: Older models sometimes favor JSON; newer models benefit increasingly from PTC, suggesting PTC is a future-proof approach.
Boundaries of the Bitter Lesson
The author cautions that PTC is not a wholesale replacement for JSON:
Practical Guidance for Adopting PTC
Conclusion: Code's Revenge
The post concludes that JSON tool calling embodies the 'human knowledge injection' pattern that Sutton warned against, while PTC embodies the general, computation-leveraging approach. Code is not replacing humans—it is liberating the AI's expressive capacity, turning the model from a rule-following tool operator into a creative problem solver.