arXiv(opens in a new tab)cs.SEOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.19596

JevCoder: When Does Decision Delegation Pay Off in Code Repair?

Jiahao Zhang, Yifan Zhang, Yu Huang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

A coding agent repeatedly makes decisions as it repairs code. These decisions shape repair trajectories and affect the token cost of successive model requests. We ask which repair decisions can be delegated to a low-cost probabilistic judge to reduce token use while maintaining repair quality. The judges answer questions with probabilities over predefined answers, without generating explanations. We evaluate judgment quality across repair stages and test how individual interventions change subsequent repair work. We compare these interventions with unguided repair, which uses no judge, and with the same workflow using the repair model itself as the judge. The benefit depends on the work an intervention changes, rather than the cost of the judgment alone. Based on these studies, we propose JevCoder, a workflow built around Jev, a low-cost probabilistic judge. It combines code-snippet recommendations with action-type guidance and uses judgments to determine when to submit. We evaluate three repair models, each on the same 400 tasks: 200 from SWE-bench Verified and 200 from SWE-Bench Pro Verified. Compared to unguided repair, JevCoder reduces mean repair-model token use by 21.6%–50.6%, with higher observed repair rates across all three models.

1 Introduction

A coding agent’s repair model chooses where to look, what to try, and when to stop. These choices affect how many steps the agent takes. When workflows resend interaction history, each request processes the accumulated context. Workflow design substantially affects this inference cost (Xia et al., 2025; Ehrlich et al., 2025). Assigning selected judgments to a cheaper model could reduce this expense. Whether delegation pays off depends on whether repair quality is maintained and on how it changes subsequent repair work.

Coding agents receive feedback during repair or use verifiers to select candidate patches (Pan et al.,

Figure

Figure 1: In a simplified recorded SWE-Bench Pro Verified case, JevCoder uses Jev's relevance probabilities to rank candidate snippets and supply selected code as the coding agent's initial context.

2025; Jain et al., 2025). SWE-PRM finds limited benefits from same-model supervision, but consistent gains with a stronger supervisor. In one setting, supervisor calls cost over six times as much as repair-model calls (Gandhi et al., 2025). We therefore ask which repair decisions are worth delegating to a low-cost judge.

We study judges that return probabilities over predefined answers without generating explanations. Jev, TypeSafe's decision model, provides structured answers and probabilities (TypeSafe, 2026). For binary questions, Jev returns the probability of "yes". Choice returns probabilities for predefined options. Score uses a predefined rating scale, with a probability assigned to each level. Our experiments evaluate all three forms. JevCoder uses binary and Choice judgments to rank snippets or trigger repair interventions. We also use the repair model itself as a judge, reading probabilities

Figure

Figure 2: JevCoder delegates judgments to a shared probabilistic judge: Jev. Before repair, a program retrieves candidate code for the issue, Jev scores each snippet's relevance, and the highest-scoring snippets enter the repair model's initial context. After each command, program rules select relevant state questions for Jev and use its answers to suggest an action type. The repair model chooses the specific command. The stopping policy depends on the model class. For the larger API models (DeepSeek, Gemini), a Choice question on the latest check output (Pass: a previously failing check now passes; Rest: other outcomes) triggers direct submission. For the smaller model (Qwen), repeated No answers to whether the next step adds information trigger a reminder and then submission.

for predefined answer tokens. Program rules determine when to ask a question and how to use the answer. Figure 1 illustrates this process for snippet recommendations. For the URL truncation issue, Jev assigns relevance 0.94 to the snippet that reads only the first child of an emphasis node.

We assess judgment quality across repair stages and examine how individual interventions change subsequent repair work. Single-component experiments compare repair outcomes and resource use with unguided repair and, where available, same-model judging. They show that more accurate file rankings do not necessarily improve repair outcomes, and that retaining recommended snippets can reduce repair-model token use despite increasing context length. Building on these component results, we propose JevCoder for cost-efficient code repair (Figure 2). It uses code-snippet recommendations to guide initial code exploration and provides action-type guidance during repair. Its stopping policies use judgments of successful checks or repeated lack of progress to determine when the agent should end a repair attempt and submit its current patch.

For each of three repair models, we compare JevCoder with unguided repair on the same 400 tasks: 200 from SWE-bench Verified and 200 from SWE-Bench Pro Verified. JevCoder reduces mean repair-model token use by 21.6%–50.6% and achieves higher observed repair rates for all three models. Compared with same-model judging, which helps distinguish workflow benefits from judging overhead, JevCoder uses 9.1% fewer tokens with DeepSeek and 23.3% fewer with Qwen. Code and evaluation results are available at https://anonymous.4open.science/r/jevcoder-artifact-8E62.

References (42)

  • DeepSeek-AI. 2026. DeepSeek-V4.1-Flash: Pushing the limits of KV cache compression. Preprint, arXiv:2609.19969. (opens arXiv in a new tab)
  • Ryan Ehrlich, Bradley Brown, Jordan Juravsky, Ronald Clark, Christopher Ré, and Azalia Mirhoseini. 2025. CodeMonkeys: Scaling test-time compute for software engineering. Preprint, arXiv:2501.14723. (opens arXiv in a new tab)
  • Shubham Gandhi, Yiqing Xie, Atharva Naik, Ruichen Zhu, and Carolyn Rosé. 2026. Steer, don't solve: Training small critic models for large code agents. Preprint, arXiv:2606.21811. (opens arXiv in a new tab)
  • My Answer is C
  • SWE-Bench Pro Verified: A Reliable Benchmark for Software Engineering Agents
  • It uses a 262,144-token service context, FP8 KV cache, at most four concurrent sequences, and a 4,096-token generation cap
  • Individual experiments further limit the evidence supplied to the judge
  • Local inference used two NVIDIA L40S GPUs with Python 3.12
  • The mini-swe-agent and SWE-bench evaluation software use the MIT license; the Qwen model weights use Apache-2.0
  • SWE-bench Verified uses our execution framework; SWE-Bench Pro Verified uses a wrapper around the public mini-swe-agent runtime (Lieret and Jimenez, 2026; Yang et al., 2024)
  • Each question is sent with its evidence and answer criteria; the judge returns probabilities over the listed answers and no explanation
  • >Judgment</td><td colspan=
  • Pooled over both repair models, Table 1 uses 3,197 code-location states (3,019 positive), 3,177 stalled-repair states (366 positive), and 951 states for post-edit checks (214 positive)
  • Jev's AUROC is 0.817 (95% CI: 0.783–0.850), compared with 0.808 (95% CI: 0.771–0.841) for same-model judging
  • The patch-judgment study uses SWE-bench Verified and SWE-Bench Pro v2, distinct from the SWE-Bench Pro Verified sample used for full-workflow evaluation
  • Across the four evidence views, Jev's stratified AUROC (computed within groups defined by the benchmark and the model that generated the patch, Eq
  • The ordered-score comparison uses 840 common DeepSeek records from 341 tasks (746 distinct judge inputs) and scores each record by the probability of the top category, all target tests passing
  • We compute
  • All submitted records are included in their original strata, including multiple records from the same task
  • Two consecutive low-progress judgments cause a reminder and four cause submission
  • >After the first positive successful-check judgment</td></tr><tr><td>DeepSeek</td><td>400</td><td>130</td><td>9</td></tr><tr><td>Qwen3.8-27B</td><td>400</td><td>57</td><td>5</td></tr><tr><td>Gemini 3.8 Flash</td><td>400</td><td>156</td><td>14</td></tr><tr><td colspan=
  • Jev durations subtract the measured fixed connection delay of 0.068 seconds
  • Blocking rates cover 13,131 scored steps from runs containing at least ten consecutive identical commands, including steps before repetition starts
  • We compare Choice with binary relevance ranking using ten candidate files on the same 200 SWE-Bench Pro Verified tasks
  • Snippet recommendations have a repair rate 3.89 points higher than without recommendations and 3.39 points higher than file recommendations (binary relevance)
  • Each change is the component condition minus matched unguided repair, except snippet withdrawal, which is withdrawal minus full retention
  • Changes are the first condition minus the second; 95% intervals appear below the estimates
  • Table 10 reports all three paired comparisons; each meets the repair-loss criterion
  • Guided and unguided repair each resolve 38 tasks, and 16 guided runs reach the time limit, compared with 22 unguided runs
  • After the check output, the reminder policy attaches a recommendation and a command to submit source changes only
  • Its threshold is 0.0086
  • The sampling and weighting rules below define the samples represented by their estimates; the closing paragraph relates these comparisons to the chosen workflow
  • Each DeepSeek component sample takes all failures of the original 200-task unguided run on a benchmark and an equal number of randomly sampled successes: 36+36 on SWE-bench Verified and 59+59 on SWE-Bench Pro Verified
  • Table 11 reports, for each condition, the paired repair-rate difference used to assess the prespecified repair-loss criterion, the mean repair-model token difference, and the median of task-level runtime differences, each with its $95\%$ interval
  • The repair-rate differences above are net changes over the same tasks
  • >DeepSeek-V4.1-Flash</td></tr><tr><td>JevCoder</td><td>291</td><td>18</td><td>14</td><td>77</td><td>+1.00</td></tr><tr><td>Same-model judging</td><td>290</td><td>18</td><td>15</td><td>77</td><td>+0.75</td></tr><tr><td colspan=
  • Medians of the two parts do not add to the total
  • >DeepSeek-V4.1-Flash (400 paired tasks)</td></tr><tr><td>Unguided repair</td><td>22.87</td><td>0.0572</td><td>0.0750</td></tr><tr><td>JevCoder</td><td>21.91</td><td>0.0548</td><td>0.0709</td></tr><tr><td>Same-model judging</td><td>38.53</td><td>0.0963</td><td>0.1251</td></tr><tr><td colspan=
  • Per-task values are means
  • Jev charges input only
  • Holding the workflow fixed, replacing the judge changes both the subsequent repair work and the tokens needed to obtain judgments
  • 95% intervals appear below the estimates; 181–184 paired tasks per comparison