Source-linked AI summary

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

Jiahao Zhang, Yifan Zhang, Yu Huang

arXiv:2610.19596v1cs.SEcs.AI

TL;DR

Repair-agent decisions shape both repair trajectories and the token cost of successive requests, raising the question of which decisions can be delegated without sacrificing repair quality. The paper evaluates JevCoder, a workflow combining snippet recommendations, action-type guidance, and judgment-based stopping. Compared with unguided repair, it uses 21.6%–50.6% fewer mean repair-model tokens and has higher observed repair rates across all three models.

  • Problem

    Repair decisions affect subsequent work and model-request costs, but it is unclear which decisions a low-cost judge can handle while maintaining repair quality.

    Source: §1 · p. 1
  • Method

    JevCoder combines code-snippet recommendations, action-type guidance, and stopping policies that use probabilistic judgments to trigger interventions.

    Source: §1 · p. 2
  • Results

    21.6%–50.6% fewer mean repair-model tokens than unguided repair, with higher observed repair rates across all three models on the same 400 tasks.

    Source: §1 · p. 2
  • Takeaways & Limitations

    The benefit of delegation depends on how an intervention changes subsequent repair work, not only on the cost of the judgment.

    Source: §1 · p. 2

    Each task and condition has one run, so the study does not estimate run-to-run variance.

    Source: Limitations · p. 9

Abstract

from arXiv · show

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

Repair agents make decisions that shape both repair quality and the cost of successive model requests, motivating tests of which decisions a low-cost judge can handle. The paper evaluates JevCoder, which combines snippet recommendations, action-type guidance, and judgment-based stopping, against unguided repair.

1 Introduction

  • Delegation is worthwhile only when repair quality is maintained and the intervention changes subsequent repair work enough to offset its costs.The study notes that more accurate file rankings do not necessarily improve repair outcomes, while retaining recommended snippets can reduce repair-model token use despite longer context.Source: §1 · pp. 1–2
  • Jev returns probabilities over predefined answers without explanations, while program rules decide when to ask questions and how to use the answers.The study evaluates Binary, Choice, and Score judgment formats; JevCoder uses Binary and Choice judgments for its interventions.Source: §1 · pp. 1–2
  • JevCoder combines code-snippet recommendations before repair, action-type guidance during repair, and stopping policies based on successful checks or repeated lack of progress.The larger API models stop on a successful check; the smaller model stops on repeated lack of progress.Source: §1 · p. 2, Figure 2 · p. 2
  • 21.6%–50.6% fewer mean repair-model tokens than unguided repair, with higher observed repair rates for all three models.Each comparison uses the same 400 tasks: 200 from SWE-bench Verified and 200 from SWE-Bench Pro Verified.Source: §1 · p. 2

2 Related Work

Prior work studies feedback and verification during repair, as well as ways to replace model decisions with cheaper mechanisms. JevCoder uses fixed-question answer probabilities to trigger predefined repair interventions.

Judgment in coding agents

  • Repair research uses trajectory feedback, trained critics, learned verifiers, tests, and hybrid verification to guide or select candidate patches.SWE-PRM provides natural-language feedback, while SWE-Gym trains a verifier to score completed repairs.Source: §2 · pp. 2–3
  • Outside repair, AutoTool predicts tools from past transitions and query routing sends requests to cheaper models when they suffice.JevCoder instead uses answer probabilities from fixed questions to trigger predefined interventions across repair stages.Source: §2 · p. 3

LLM judgment and probability reliability

  • Prior work evaluates judges using scores or comparisons, and software-repair studies distinguish score discrimination from probability calibration.This paper tests judgment quality on specific repair questions and measures how judgments affect repair outcomes and resource use.Source: §2 · p. 3

3 Study Setting

The study evaluates delegated decisions in repository-level issue repair using three repair models, fixed task samples, and paired comparisons. It measures repair, token use, and runtime under specified execution limits and analysis procedures.

Tasks and comparisons

  • Each repair model is compared with unguided repair on the same 400 tasks: 200 SWE-bench Verified and 200 SWE-Bench Pro Verified tasks.The sample covers Python, Go, JavaScript, and TypeScript repositories; DeepSeek and Qwen also have same-model judge comparisons, while Gemini does not expose the required answer-token probabilities.Source: §3 · p. 3
  • Component studies use balanced task samples, selected trajectory analyses, and 1,192 submitted-patch records to examine interventions and judgments.DeepSeek component studies use 72 SWE-bench Verified and 118 SWE-Bench Pro Verified tasks; Qwen follows similar procedures, and Gemini analyses selected judgments in existing trajectories.Source: §3 · p. 3

Judges and evidence

  • Jev and same-model judges receive the same questions and evidence, while reference patches and official test outcomes supply evaluation labels.Judgment-quality experiments also include Qwen3.5-2B; evidence can include source snippets or command history.Source: §3 · p. 3

Repair and resource measures; Analysis

  • Repair rate is official pass@1, repair-model tokens count total input and output, and runtime combines model, tool, and judge time.Attempts stop at the first of 250 repair-model requests, 3,000 seconds, or US$3 in API costs; paired task-level bootstrap intervals are used for comparisons.Source: §3 · p. 3

4 Judgment Quality

The judgment-quality study tests code relevance, repair-state and next-action judgments, and stopping and submission judgments. Jev performs well on several repair-state distinctions but has limited ability to predict whether submitted patches pass official tests.

4.1 Code Relevance

  • Jev-selected snippets retain 81.6% of reference lines covered by candidates, compared with 78.0% for DeepSeek given the same candidates and questions.File-level evaluation ranks 100 retrieved candidates by relevance probability and uses reference-patch-modified files as labels.Source: §4.1 · p. 4

4.2 Repair State and Next-Action Judgments

  • Jev has higher pooled AUROC than same-model judging on all four state questions and reaches 0.968 for stalled repair, versus 0.738 for code location.On repeated-command recognition, Jev achieves 99.4% recall at a 0.6% false-positive rate; replay blocks 61.9% of scored steps in long-repeat runs, versus 28.0% for Qwen3.5-2B under the stated constraint.Source: §4.2 · p. 4

4.3 Stopping and Submission Judgments

  • For patch outcomes, Jev’s AUROC is 0.562–0.595 versus DeepSeek’s 0.638–0.684, but Jev reaches 0.990 for recorded passing-check transitions versus 0.974 for DeepSeek judging.On the same DeepSeek patch records, Jev’s ordered Score question reaches AUROC 0.642, up from 0.581 for its binary question; the paper notes it still struggles to predict official test success.Source: §4.3 · pp. 4–5

5 Decision Delegation Across Repair Stages

The component studies test whether delegated decisions change repair work enough to reduce resource use while maintaining repair outcomes. Snippet recommendations, action-type guidance, and stopping interventions show different benefits and trade-offs.

5.1 Code-Snippet Recommendations

  • File recommendations use 5.8 fewer repair-model requests and 0.354M fewer tokens per task while resolving a similar number of issues.File recommendations using Jev’s Score interface reduce token use but do not meet the prespecified repair-loss criterion.Source: §5.1 · p. 5, Table 2 · p. 6
  • Snippet recommendations cut pre-edit read and search commands by 5.0 per task and 0.126M tokens; withdrawing them after ten requests raises token use by 0.538M on 116 matched DeepSeek tasks.The comparison supports retaining snippets despite their tokens remaining in the interaction history.Source: §5.1 · pp. 5–6
  • Snippet recommendations resolve 68 issues versus 64 with file recommendations and 63 without recommendations, with weighted repair rate 3.9 percentage points higher.They also use 0.206M fewer repair-model tokens per task on average, with comparable runtime.Source: §5.1 · p. 5, Table 2 · p. 6

5.2 Action-Type Guidance

  • With DeepSeek, Jev action-type guidance resolves 45 issues versus 39 with unguided repair, an 8.3-point higher repair rate and 0.169M fewer tokens per task.Jev maps repair-state judgments to suggested action types while the repair model chooses commands; command blocking’s repair-rate interval lower bound falls below −10 percentage points on Qwen.Source: §5.2 · p. 6

5.3 Submission and Early Stopping

  • After successful checks, unguided runs still make median 9, 5, and 14 further requests for DeepSeek, Qwen, and Gemini; direct submission saves DeepSeek 0.295M tokens per task.The submission workflow resolves 45 issues versus 39 with unguided repair.Source: §5.3 · p. 6
  • On 72 SWE-Bench Pro Verified tasks, no-progress submission and unguided repair each resolve 27, while submission saves 1.258M tokens and 655.8 seconds in paired median runtime per task.The intervention is tested with Qwen3.8-27B, whose runs more often stall before a passing check.Source: §5.3 · p. 7

6 JevCoder

JevCoder combines probabilistic judgments with program rules to guide repair decisions. The repair model remains responsible for generating code and choosing commands, while the stopping policy varies by model size.

6 JevCoder

  • Jev supplies probabilities for fixed questions, and program rules use them to decide interventions while handling decisions directly determined by the repair trajectory.Jev interprets evidence from the repository and repair trajectory; the repair model generates code and chooses commands.Source: §6 · p. 7
  • Before repair, Jev ranks retrieved code snippets by relevance, and the program supplies selected snippets with file paths and line ranges throughout the interaction history.Snippets are selected in descending probability order within a length budget, with overlapping source ranges merged.Source: §6 · p. 7
  • After commands, trajectory-selected state questions and probability thresholds guide suggested action types, while the repair model chooses the specific command.The program detects exact command repetition, and Jev can identify repeated searches or reads that yield no new information despite different wording.Source: §6 · p. 7
  • DeepSeek and Gemini stop on an observed successful check, whereas Qwen3.8-27B stops after repeated low probabilities indicate lack of progress.A qualifying successful-check judgment can trigger direct submission; continued lack of progress triggers submission before the proposed command is executed.Source: §6 · p. 7

7 JevCoder Evaluation

On 400 matched tasks per condition, JevCoder uses fewer repair-model tokens and has higher observed repair rates across the three repair models. Same-model judging and component ablations show that both judging overhead and workflow components matter.

7 JevCoder Evaluation

  • JevCoder reduces mean repair-model token use by 21.6%–50.6% and achieves higher observed repair rates across all three models, with every comparison meeting the prespecified repair-loss criterion.Qwen has the largest relative saving, a statistically significant 50.6% reduction; JevCoder newly resolves more tasks than it loses for every model.Source: §7 · pp. 7–8, Table 3 · p. 8
  • JevCoder reduces paired median runtime by 149.3 seconds for Qwen, 123.2 seconds for Gemini, and 9.5 seconds for DeepSeek, with all three intervals excluding zero.Jev usage is counted separately from repair-model totals: 0.152M, 0.193M, and 0.184M tokens per task for DeepSeek, Qwen, and Gemini.Source: §7 · p. 8
  • Same-model judging reduces repair-request tokens by 13.7% for DeepSeek and 35.5% for Qwen, but added judging requests reverse the total-token ordering against JevCoder.For Qwen, repair requests use 0.673M tokens per task and judging adds 0.291M, for 0.964M total versus JevCoder’s 0.739M.Source: §7 · p. 8
  • Removing any one component from DeepSeek’s JevCoder workflow lowers observed repair rate and raises mean repair-model token use and paired median runtime.Removing snippet recommendations increases mean repair-model token use by 0.174M per task.Source: §7 · p. 8

8 Conclusion

The conclusion is that delegation can reduce repair work when judgments are used to change the agent’s trajectory and stopping decisions. JevCoder combines these interventions and, across three repair models, uses fewer repair-model tokens with higher observed repair rates.

8 Conclusion

  • Jev’s judgment evaluations show stronger discrimination for repair states than for patch outcomes.Source: §8 · p. 8
  • JevCoder combines pre-repair snippet recommendations, in-repair action-type guidance, and stopping policies adapted to model size.The larger API models stop on a successful check, while the smaller model stops on repeated lack of progress.Source: §8 · p. 8
  • JevCoder uses 21.6%–50.6% fewer repair-model tokens than unguided repair, with higher observed repair rates for all three models.Source: §8 · p. 8

Limitations

The evaluation is bounded by a single Jev version, a fixed set of repair models and benchmarks, and one run per task and condition. Several judgment labels are proxies, and runtime measurements reflect differing service setups.

Limitations

  • The study evaluates one fixed Jev version and three repair models on 400 tasks from SWE-bench Verified and SWE-Bench Pro Verified.The runs use the same agent framework, but repair models differ in stalling and how long they continue after their last edit.Source: Limitations · p. 9
  • One run per task and condition leaves run-to-run variance unestimated, although paired bootstrap intervals quantify uncertainty across tasks.Mean token reductions exclude zero for all three models.Source: Limitations · p. 9
  • File relevance and repair state are proxy labels: relevance follows reference-patch changes, while repair states are assigned by program rules rather than semantic correctness.Intervention benefits are evaluated using official pass@1 and repair-model token use.Source: Limitations · p. 9
  • Runtime reflects serving conditions: Qwen uses a local GPU service, while DeepSeek, Gemini, and Jev use remote APIs with a measured fixed connection delay subtracted.Tokens remain the primary resource measure, and repair models use the same serving setup within each unguided-versus-JevCoder comparison.Source: Limitations · p. 9

B.1 Code-Snippet Recommendations

  • Snippet recommendations may be unavailable when judge responses are missing or invalid, no valid snippets remain, or the issue and one snippet exceed the payload bound.The workflow ranks valid snippets without a relevance threshold and packs them under a budget.Source: §B.1 · p. 11

B.2 Action-Type Guidance

  • Action guidance uses model-specific thresholds and waiting periods selected through replay, and unresolved probabilities do not trigger a yes-or-no decision.The policy also limits delivered notes to two per attempt, at least ten steps apart.Source: §B.2 · pp. 11–12

C.1 Labels and Judge Comparisons

Judge quality varies by repair decision and evidence format: repair-state and reproduction judgments distinguish program-labeled outcomes well, while patch-outcome prediction is weaker. The section also reports stopping-signal and request-timing evaluations.

C.1 Labels and Judge Comparisons

  • 123 of 162 tasks (75.9%) have a reference-patch file ranked first by Jev, compared with 47 (29.0%) for Qwen3.5-2B.The file-relevance candidates are generated from repository snapshots using issue text and retrieval methods.Source: §C.1 · p. 13
  • 0.822 versus 0.804 are Jev’s and same-model judging’s AUROCs for reproduction labels pooled across 2,833 sampled states from DeepSeek and Qwen trajectories.The labels are program-derived from the latest test or probe in the recorded trajectory.Source: §C.1 · p. 13
  • 0.738, 0.968, and 0.802 are Jev’s AUROCs for code location, stalled repair, and post-edit checks, compared with 0.701, 0.931, and 0.797 for same-model judging.These pooled comparisons use states from both repair models.Source: §C.1 · p. 14
  • 0.562–0.595 is Jev’s stratified AUROC across four patch-evidence views, compared with 0.638–0.684 for the DeepSeek judge.On 840 common DeepSeek records, ordered scoring reaches 0.642 AUROC, versus 0.581 for the binary question and 0.652 for DeepSeek scoring.Source: §C.1 · p. 15

C.2 Stopping Signals

  • 0.899 is Jev’s pooled AUROC for successful-check judgments across 505 inputs from three repair models’ trajectories.The sample contains 40 positive and 465 negative inputs under the stated check-transition rules.Source: §C.2 · p. 16
  • The no-progress replay triggers reminders in 5 of 305 resolved DeepSeek runs and none of its 400 runs are submitted; Gemini receives 48 reminders and 4 submissions across 400 runs.The replay uses two consecutive low-progress judgments for a reminder and four for submission.Source: §C.2 · p. 16

C.3 Judge Request Time

  • 0.137–0.144 seconds are Jev’s median adjusted durations across four saved request types, compared with 0.035–0.083 seconds for local Qwen3.5-2B.Client timings retain network and queueing delay after the measured fixed connection delay is subtracted.Source: §C.3 · p. 16

D.1 Opening Context

Opening recommendations are evaluated both for how well they identify useful files and for how they change the context and work available to the repair model. The comparisons show that ranking quality alone does not determine repair outcomes, while retaining recommended snippets can reduce resource use.

D.1 Opening Context

  • Choice ranked a reference-patch file first on 90.0% of 200 SWE-Bench Pro Verified tasks, versus 81.0% with binary relevance ranking.On the 118-task DeepSeek sample, ordered scoring placed a reference file first on 112 tasks, versus 104 for Choice with ten candidates.Source: §D.1 · p. 17
  • On 200 SWE-Bench Pro Verified tasks, two-stage Choice selection ranked a reference file first on 179 tasks and included one among its five selections on 195.On the 118 tasks also run online, the corresponding counts were 104 and 115.Source: §D.1 · p. 17
  • 68 tasks were resolved with snippet recommendations, versus 64 with binary file recommendations and 63 without recommendations; repair rates were 3.89 and 3.39 percentage points higher, respectively.Estimates are reweighted to the original failure/success proportions on the 118-task sample.Source: §D.1 · p. 17
  • On Qwen’s expanded 118-task sample, snippet recommendations increased weighted repair rate by 1.97 percentage points and reduced mean repair-model token use by 0.230M per task.The paired median runtime reduction was 10.7 seconds.Source: §D.1 · p. 17
  • 2.533M mean repair-model tokens per task with snippet recommendations versus 2.739M without recommendations is a reduction of 0.206M.The comparison uses the same original failure/success proportions.Source: §D.1 · p. 17, Table 8 · p. 18
  • Initial recommendations reduced mean command count by 4.97 per task and mean repair-model token use by 0.126M on the 118-task DeepSeek sample.The comparison is against unguided repair and is reweighted to the original failure/success proportions.Source: §D.1 · p. 18
  • Withdrawing recommended snippets increased mean repair-model token use by 0.538M per task and paired median runtime by 32.1 seconds.Withdrawal also prompted 6.15 additional requests on average; the runtime estimate uses 115 complete pairs.Source: §D.1 · p. 18
  • Jev file scoring resolved 60 tasks on the 118-task sample, versus 63 without recommendations, and its repair-rate lower endpoint missed the ten-point repair-loss bound.Same-model scoring and Jev versus same-model scoring met the criterion.Source: §D.1 · pp. 18–19, Table 9 · p. 19

D.2 During Repair

During-repair and closing interventions change the agent’s actions or submission decisions, with outcomes that vary by intervention and model. The reported component comparisons also use samples with different historical success and failure strata.

D.2 During Repair

  • Jev guidance resolved 45 of 72 DeepSeek tasks, compared with 44 for same-model judging and 39 for unguided repair; all three paired comparisons met the repair-loss criterion.The comparisons are reported in Table 10.Source: §D.2 · p. 19, Table 10 · p. 19
  • On 72 Qwen tasks, guided and unguided repair each resolved 38 tasks, while Jev guidance reduced paired median runtime by 12.4 seconds versus unguided repair.The Jev-guided workflow delivered 59 notes across 43 runs; 13 matched the next command’s action type and 28 matched an action within three commands.Source: §D.2 · p. 19
  • In JevCoder trajectories, suggested action types appeared within the next three repair-model requests at rates 23.7 percentage points higher for DeepSeek, 11.8 for Qwen, and 8.3 for Gemini.The rates compare guided windows with unguided reference windows within the same runs, averaged by benchmark and weighted equally.Source: §D.2 · p. 19
  • Command blocking resolved 28 of 72 tasks versus 30 without blocking and missed the repair-loss criterion; separately, Jev reduced identical-command streaks by a paired median of 82 commands on 24 historical stalled failures.The blocking repair-rate difference was −2.78 percentage points.Source: §D.2 · pp. 19–20

D.3 Closing Repair

  • Jev reminders resolved 44 of 72 tasks, versus 42 with same-model reminders and 39 with unguided repair; Jev’s repair rate was 6.94 percentage points higher than unguided repair.Mean repair-model token use changed by +0.001M per task relative to unguided repair.Source: §D.3 · p. 20
  • Automatic submission resolved 45 of 72 DeepSeek tasks, versus 39 with unguided repair, while using 0.295M fewer repair-model tokens per task on average.The repair-rate difference was 8.33 percentage points, meeting the repair-loss criterion; paired median runtime fell by 8.9 seconds.Source: §D.3 · p. 20
  • On 72 Qwen tasks, no-progress submission resolved 27 tasks in each condition and reduced mean repair-model token use by 1.258M per task.The paired median runtime reduction was 655.8 seconds; unguided repair reached the time limit in 37 runs, versus six under the Jev policy.Source: §D.3 · p. 20

D.4 Sampling and Estimation

  • Component estimates use fixed failure/success strata, with weighted opening comparisons on SWE-Bench Pro Verified and unweighted 72-task estimates; selected components include snippet recommendations, action-type guidance, and model-specific submission policies.The chosen components meet the repair-loss criterion with lower token use or higher observed repair rate; binary file recommendations (Score) and command blocking do not.Source: §D.4 · pp. 20–21

E Full-Workflow Statistics

Full-workflow analyses assess repair quality and resource use on paired tasks, then examine task-level outcomes, runtime, estimated costs, and component removal. JevCoder newly resolves more tasks than it loses for each of the three repair models.

E Full-Workflow Statistics

  • All five full-workflow repair comparisons met the ten-point repair-loss criterion.Table 11 reports paired repair-rate differences, mean repair-model token differences, and median task-level runtime differences with 95% intervals.Source: E Full-Workflow Statistics · p. 21, Table 11 · p. 21
  • JevCoder newly resolved more tasks than it lost for all three repair models, retaining 95.4% of DeepSeek’s and 94.9% of Gemini’s baseline-resolved tasks.Table 12 separates tasks gained by JevCoder from those resolved only by the baseline.Source: E Full-Workflow Statistics · p. 21, Table 12 · p. 21
  • Runtime decomposition separates judge inference from repair-model requests and tool execution; same-model judging’s median judging time exceeded its repair-and-tool time savings, while JevCoder’s median judging time was below 13 seconds for both models.The medians of the two runtime components do not add to the total median.Source: E Full-Workflow Statistics · p. 21, Table 13 · p. 22
  • Including Jev charges, estimated API cost fell by 4.2% with DeepSeek and 29.7% with Gemini; cost per resolved issue fell by 5.4% and 32.5%, respectively.The estimates combine repair and judging requests.Source: E Full-Workflow Statistics · p. 22, Table 14 · p. 22
  • For the full Gemini sample under a common pricing scenario, adding Jev input charges yielded estimated costs of US$3.073 per task for JevCoder versus US$4.147 for unguided repair, a 25.9% reduction.The scenario uses US$0.75 per million input tokens and US$3.75 per million output tokens, with no cached-input discount.Source: E Full-Workflow Statistics · p. 22
  • Jev’s input price was 4–7 times below DeepSeek’s, 18 times below Gemini’s, and 48–238 times below listed frontier-model prices; Qwen’s local GPU service had no assigned API price.For DeepSeek, net API savings remained positive up to a Jev price 39% above the experimental rate.Source: E Full-Workflow Statistics · p. 22, Table 15 · p. 22
  • Relative to same-model judging, JevCoder used 9.1% fewer tokens with DeepSeek and 23.3% fewer with Qwen, including judging requests in the comparison.Same-model judging used fewer repair-request tokens before its judging requests were added.Source: E Full-Workflow Statistics · p. 23
  • Removing any single component from the DeepSeek JevCoder workflow lowered observed repair rate and raised mean repair-model token use and paired median runtime.Runtime increased most when snippet recommendations or automatic submission were removed.Source: E Full-Workflow Statistics · p. 23, Table 16 · p. 23
Loading 2610.19596v1…