CodeRescue: Budget-Calibrated Recovery Routing for Coding Agents
Qijia He, Jiayi Cheng, Chenqian Le, Rui Wang, Xunmei Liu, Yixian Chen, Jie Mei, Zhihao Wang, Xupeng Chen, Yuhuan Chen, Tao Wang
Abstract
Coding agents increasingly operate in executable environments where a failed attempt produces actionable feedback rather than merely an incorrect answer. Existing cost-aware systems typically treat such failures as cascade decisions: try a cheap model first, then escalate hard cases to a stronger and more expensive model. In coding, however, execution feedback can also make further cheap-model recovery worthwhile, raising a budgeted deployment question: when should an agent spend more cheap compute, and when should it escalate? We formulate this post-failure decision as recovery routing over heterogeneous actions and train a supervised router from execution rollouts. To make the same router usable under changing budgets, we add a Conformal Risk Control (CRC) layer that selects a deployment-time cost penalty without retraining and provides marginal expected-cost control under exchangeability. Across held-out failures from five coding benchmarks, cheap recovery and escalation exhibit complementary success patterns. The calibrated frontier improves over fixed actions, prompt-only routers, and a binary cascade baseline; in the main GPT-5.4-nano/GPT-5.4 setting, one CRC-calibrated frontier point exceeds always-escalate solve rate while using 35% of its mean recovery cost. Code is available at https://github.com/Qijia-He/agent-budget-control.
Create a lesson
Metadata
- Comments
- Withdrawn at the request of ByteDance because the manuscript was submitted before completing the company's required internal review and approval process
Related papers
MeterRouter: Budget-Aware Dynamic Routing for Multi-Agent Systems
Shared title terminologycs.AIYue Xu, Leikun Yin, Ruiming Min et al.
Asset4D-Bench: Benchmarking Coding Agents for Editable 3D and 4D Reconstruction
Shared title terminologycs.AIChengyi Sun, Deyuan Liu, Lei Zhao et al.
Partial Routing: Trace-Tuned Delegation for Resource-Efficient Agentic Workflows
Shared title terminologycs.AISiddharth Arya, Kshitij Jain
The Control-Flow Tax: Specialized Decision Routing for LLM Agent Workflows
Shared title terminologycs.AIZhikai Cheng, Shuanghu Wang, Li Jiang
Coding4Games: Can Modern Coding Agents Play Modern Video Games?
Shared title terminologycs.AIShifang Zhao, Haoyu Wang, Yuyang Yin et al.
Shared Organizational Memory for Enterprise Coding Agents: System Design and Deployment Snapshot
Shared title terminologycs.AIHarsh Rao Dhanyamraju, Leonidas Raghav