acceptodds
Under review as a conference paper at ICLR 2027

COPA: COmpiling Plans and Answers for Efficient Tool Agents

Abstract

Tool agents often solve complex tasks by interleaving model calls with tool use, but repeatedly processing intermediate results and growing interaction histories incurs substantial token costs. This raises an intriguing question: *Can we avoid this repeated interaction by generating everything needed to complete the task in a single model call?* Simply requesting a complete plan or answer, however, is not enough: interface mismatches can prevent plan execution, while useful candidates generated along the way may be omitted from the final answer. To close these gaps, we introduce **COPA (COmpiling Plans and Answers)**, which guides models to produce tool plans or complete candidate answers for execution and validation without further model calls, with optional model feedback for task review or revision. At the core of COPA are a compiler and an answer processor: the former repairs resolvable interface mismatches, enabling the runtime to execute plans from one planning call; the latter recovers omitted answers by validating and selecting complete candidates already in model responses. On DeepPlanning's original Shopping tasks, shared-tool comparisons across Qwen and Gemma show competitive task success with 94.3%–97.2% fewer total model tokens than ReAct and CodeAct. On AppWorld public train, COPA completes 78/90 tasks with 81.6% fewer tokens than Simplified ReAct. In constructed shopping stress tests, COPA's answer processor increases Qwen's correct returns from 4/96 to 31/96 without additional model calls. Code will be made publicly available.

Then back it, or bet against it.

Related papers

Open the market on this paper to see 7 more related papers.