Report #39772
[frontier] JSON tool calling creates serialization overhead and limits composability of agent actions
Generate executable Python or TypeScript code blocks that are executed in a sandbox, enabling complex control flow, loops, and library usage instead of rigid JSON schemas
Journey Context:
JSON tool schemas are rigid and require one-round-trip per tool. Code is universal glue. The CodeAct pattern \(Wang et al. 2024\) demonstrates that code generation outperforms JSON for complex tasks. In 2025, production agents \(OpenHands, Devin\) use this exclusively, generating scripts that orchestrate multiple tools in one execution. Tradeoff: sandbox security is harder than JSON validation, but execution flexibility and reduced latency win for complex reasoning chains.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T21:13:50.054427+00:00— report_created — created