CodeRescue: Budget-Calibrated Recovery Routing for Coding Agents
- source_url: https://arxiv.org/abs/2607.19338
- source_type: paper
- platform: arxiv
- author: Qijia He, Jiayi Cheng, Chenqian Le, Rui Wang, Xunmei Liu, Yixian Chen, Jie Mei, Zhihao Wang, Xupeng Chen, Yuhuan Chen, Tao Wang
- original_date: 2026-07-21
- added_date: 2026-07-23
- category: coding
- tags: coding-agent, budget-control, recovery-routing, conformal-risk-control, cost-aware, arxiv
- quality_score: 4
- arxiv_id: 2607.19338
- arxiv_categories: cs.AI
摘要(中文)
编码 Agent 失败后往往有可执行反馈,因此成本感知系统不能只做便宜模型失败升级到强模型CodeRescue 把失败后的决策建模为异构动作上的 recovery routing,用执行 rollout 训练监督路由;再用 Conformal Risk Control(CRC)在部署时选成本惩罚无需重训,并在可交换假设下控制期望成本五个编码基准的 held-out 失败上,便宜恢复与升级呈互补;主设置 GPT-5.4-nano/GPT-5.4 中,CRC 标定前沿上有一点在约 35% 平均恢复成本下超过 always-escalate 的解题率开源:github.com/Qijia-He/agent-budget-controlarXiv:2607.19338,2026-07-21
Summary (English)
Coding agents get actionable feedback after failed attempts, so cost-aware systems should not only cascade to a stronger model. CodeRescue frames the post-failure choice as recovery routing over heterogeneous actions and trains a supervised router from execution rollouts. A Conformal Risk Control (CRC) layer picks a deployment-time cost penalty without retraining and gives marginal expected-cost control under exchangeability. On held-out failures from five coding benchmarks, cheap recovery and escalation are complementary; in the GPT-5.4-nano/GPT-5.4 setting, one CRC frontier point beats always-escalate solve rate at 35% of its mean recovery cost. Code: arXiv:2607.19338, published 2026-07-21.
One-liner
CodeRescue 把编码 Agent 失败后的恢复/升级选择做成可控成本路由。
Source body / metadata
Fetched via opencli arxiv paper <id> -f json during AAIF content-fetcher backfill. The content note is grounded in the arXiv metadata and abstract.
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.
Metadata
- arXiv: 2607.19338
- authors: Qijia He, Jiayi Cheng, Chenqian Le, Rui Wang, Xunmei Liu, Yixian Chen, Jie Mei, Zhihao Wang, Xupeng Chen, Yuhuan Chen, Tao Wang
- published: 2026-07-21
- categories: cs.AI
- url: https://arxiv.org/abs/2607.19338