Skip to content

CodeRescue: Budget-Calibrated Recovery Routing for Coding Agents

Jul 2026 · arXiv.org · Vol abs/2607.19338 · 2 citations · 33 references
Computer Science

TL;DR

This work forms a 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, and adds a Conformal Risk Control layer that selects a deployment-time cost penalty without retraining and provides marginal expected-cost control under exchangeability.

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.

View source

Similar papers

Review Aug 2026

LLMs Can Predict Failure Risk, But Struggle to Predict Which Collaboration Protocol Pays Off: Cost-Aware Protocol Routing Across Reasoning Tasks

Multi-agent large language model (LLM) systems can improve reasoning by spending more computation, but deployment requires deciding when extra collaboration is worth its cost, so confidence can support initial escalation, while protocol-specific cost-aware routing remains unresolved.

Chih-Hsuan Yang, Jingyan Jiang, Cheng-Hau Yang et al. · 0 citations
#machine learning Preprint Sep 2026

FORGE: Form-Optimal Routing of Grounded Evidence for Frozen LLM Agents

ForGE is proposed, a unified framework for adapting frozen models through per-query routing over a joint action space that spans both support form and thinking depth and improves accuracy at 42-45% lower token cost on both main hosts.

Xi Xiao, Yun-Bei Zhang, Chen Liu et al. · 0 citations
#artificial intelligence Preprint Sep 2026

Risk-Aware Adaptive Evaluation: Finding High-Impact Failures Under Limited Budgets

Evaluating interactive agents is expensive. Agent behavior is stochastic, so reliability must be measured over repeated trials, but failures are rare and differ widely in how much they matter. Standard benchmarks spend this budget uniformly: a read-only lookup is sampled as often as an irreversible payment action. We i...

Priyanath Maji, S. Chowdhury · 0 citations
Review Sep 2026

ExecuCritic: Calibrated Critic Shaping for Code Generation with Verifiable Rewards

Execution feedback is a useful supervision signal for code models because unit tests are objective and directly measure program correctness. Its weakness is that an entire program is often reduced to one pass or fail bit, leaving RLVR to solve a difficult credit assignment problem. At the same time, coding systems ofte...

Jun Cao, Ying-Jie He · 0 citations
#software testing Preprint Aug 2026

Disagree to Explore, Agree to Commit: Routing-Guided Test-Time Scaling for Software Agents

This work introduces Risa (Routing-Informed Steering and Arbitration): within trajectories, routing encourages diverse exploration and controlled convergence during patch commitment; across separately sampled trajectories, agreement at informative patch positions selects a final candidate.

Kang Chen, Junjie Nian, Yi-Xin Cao et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.