CodeRescue: Smarter Cost-Aware Recovery 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 · July 21, 2026
Coding agents often fail on their first try, but execution feedback can guide recovery. Existing systems escalate failures to expensive models, wasting money when cheap models could recover. CodeRescue introduces a supervised router that decides post-failure: try cheap recovery or escalate? It uses Conformal Risk Control to adapt to changing budgets without retraining, ensuring cost control. On five benchmarks, it matches or exceeds always-escalate accuracy while cutting costs by 65% in one scenario. This matters for developers deploying AI coding assistants: they can now balance cost and performance dynamically, making AI-assisted coding more economical at scale.
Read more: arXiv 2607.19338
Educational content only, generated with AI assistance from public research abstracts. Not investment advice. Thank you to arXiv for use of its open access interoperability.