Create and explore imaginative 3D worlds with our new product Dreamfield (opens in a new tab)
Papers
Topics
Authors
Recent
Search
2000 character limit reached

What Resolve Rate Hides: Trajectory Structure Diagnostics for Coding Agents

Published 7 Jul 2026 in cs.SE | (2607.06184v1)

Abstract: Coding agents are ranked almost entirely by resolve rate: whether their final patch passes the target tests. Yet two agents can reach the same outcome through very different processes, and a single pass/fail label says nothing about why a run failed or why an accepted run spent extra steps, time, or tokens. This process evidence lives in the trajectory, which records a run's searches, reads, edits, tool calls, validation, and reversions. However, raw traces are heterogeneous and hard to compare across runs. We present TraceProbe, a trajectory-diagnostic framework that recovers what resolve rate hides. TraceProbe normalizes each raw run into a canonical nine-type action taxonomy with deterministic effect labels, then applies two rule-based modules: Insight names single-trajectory anti-patterns adapted from established debugging practice (e.g., search loops, verification skips), while Converge aligns pairs of runs and classifies where their behavior diverges under controlled references. Applying TraceProbe to 2,500 trajectories from five production settings on SWE-Bench Verified, we find that (i) file choice is too coarse to separate success from failure, whereas function selection and completion behavior localize it; (ii) Insight anti-patterns act mainly as corpus-level difficulty clues, with search loops the most stable; and (iii) even resolved runs differ in how quickly they reach relevant code and how much failed work they incur. Trajectory structure thus adds auditable diagnostic context to outcomes by localizing inspection targets, suggesting failure hypotheses, and prioritizing runs for review.

Citations (2)

Summary

  • The paper introduces TraceProbe, a deterministic framework that normalizes coding-agent traces, labels observable action effects, detects process anti-patterns, aligns runs to references, and tracks gold-patch milestones with explicit oracle assumptions.
  • Search loops are the only anti-pattern that transfers reliably across SWE-Bench Verified and Pro, appearing in 34.2% of easy versus 67.6% of hard tasks and showing outcome ratios of 0.55 and 0.64, while other detector thresholds require benchmark-specific re-auditing.
  • Trajectory diagnostics expose differences that resolve rate and raw telemetry miss: function-level divergence emerges about 20 steps before failure, fewer than 3% of runs reach first passing validation mid-run, and scaffold effects vary sharply by model.

Motivation and problem statement

Coding agents are evaluated almost exclusively by resolve rate — whether the final patch passes the target test suite. The authors argue that this outcome label conceals process-level differences that matter to agent developers: two runs can both succeed while one reaches a targeted fix in 10 steps with no failed actions and another takes 49 steps with repeated failure-and-recovery spans. Prior work has either questioned the reliability of pass/fail outcomes (weak tests, benchmark memorization, infrastructure noise) or scored trajectories against reference patches or sub-goal sequences, but deterministic, auditable diagnostics that name concrete trajectory patterns, compare runs under controlled references, and state their oracle assumptions have been lacking. TraceProbe is proposed to fill that gap.

Framework design

TraceProbe normalizes raw trajectories from heterogeneous scaffolds into a shared representation via three layers. Scaffold adapters translate Claude Code, Codex, and OpenCode traces into a common step schema; each step is then mapped to one of nine canonical action types (file read/write, search, command, plan, navigate, fetch, agent spawn, reason), and each action receives a deterministic effect label (survived, failed, reverted, justified, recorded, off-anchor, reasoning) derived from observable state transitions rather than LLM judgment. A workflow-phase classifier adds coarse stage labels, and an optional semantic layer of LLM-assigned fine-grained tags is deliberately quarantined from the main claims because its outputs may vary with the labeling model.

Two rule-based modules operate on this substrate:

  • Insight applies frozen single-trajectory predicates adapted from software engineering anti-pattern traditions — search loops (≥10 consecutive searches/reads with no write or validation), re-read churn, tool oscillation, unsupported completion claims, shell-over-tool usage, structured plan absence, and redundant search.
  • Converge aligns a compared run against a chosen reference trajectory using monotonic LCS alignment with action-specific compatibility rules (O(nm)O(nm)), groups unmatched spans, scores them on observable metrics with frozen thresholds, and classifies divergence across three layers: file selection, edit stability, and completion behavior.
  • Milestones record when a run first reaches task-relevant artifacts (first anchor read/write, all anchors written, first passing validation), grounded in the gold-patch anchor set; unreached milestones are right-censored.

The paper is explicit about oracle assumptions: structural detectors are oracle-free, while off-anchor labels, milestones, and benchmark-informed divergence classifications require gold-patch anchors. Function-level anchors are resolved deterministically by mapping patch hunks to enclosing def/class scopes without an LLM.

Empirical setup

The corpus comprises 2,500 trajectories: all 500 SWE-Bench Verified tasks under five production settings spanning three scaffolds (Claude Code, Codex, OpenCode) and three models (Opus 4.6, GPT-5.4, GLM-5). This supports same-scaffold model contrasts and same-model scaffold contrasts. A 50-task stratified subsample is repeated three times per setting (750 additional runs) to estimate within-task variance, and all 266 Python SWE-Bench Pro tasks (1,330 runs) serve as a cross-benchmark transfer check. Baselines are restricted to same-trajectory constructs: resolve rate alone and raw telemetry (steps, tokens, tool counts).

Findings

Failure evidence is localized at function granularity, not file granularity. Same-task alignment of failed runs against resolved references shows file selection as the largest or tied-largest divergence layer (e.g., 95.0% for Codex-GPT vs. OpenCode-GPT), but the finer function-selection analysis separates distinct failure shapes: wrong-file scope, right-file-wrong-function, and right-function-wrong-edit. Median lead time from earliest function-level divergence to failure is roughly 20 steps before termination, meaning the signal arrives early enough to guide inspection — though the authors caution it does not establish causality.

Search loops are the only robustly transferable anti-pattern signal. Search loop prevalence rises monotonically with task difficulty (34.2% easy → 67.6% hard) and shows an outcome link below 1 on both SWE-Bench Verified (0.55) and Pro (0.64). Re-read churn retains direction but weakens on Pro (0.64 → 0.84); several other detectors flip direction entirely. The paper's honest conclusion is that detector definitions transfer but thresholds must be re-audited per benchmark — a notable concession given that thresholds were calibrated on Verified itself.

Effect labels expose differences raw telemetry hides. Codex achieves the highest resolve rate (78.4%) with the largest survived-action share (36.2%), while OpenCode/GPT-5.4 has the fewest steps per task (14) yet the highest failed-action share (17.6%) and harmful ratio (0.20). Settings with similar resolve rates differ substantially in durable edits, lost work, and off-anchor exploration (OpenCode/Opus at 10.2% vs. OpenCode/GPT at 23.0%).

Milestone timing decouples progress speed from run length. In raw steps, OpenCode/Opus reaches the first anchor write earliest; normalized by run length, OpenCode/GLM moves earliest despite longer runs. Notably, M4 (first passing validation) is reached by fewer than 3% of runs in every setting — a striking observation about how rarely agents validate mid-run.

Scaffold effects are model-dependent. Under GPT-5.4, the Codex vs. OpenCode contrast diverges strongly (93.0% file-selection disagreement); under Opus 4.6, the analogous contrast shows far less divergence (18.6%). Reference-change analysis shows file selection is nearly insensitive to which resolved run serves as reference (0.69% category change), whereas edit stability shifts in 22.1% of comparisons. On SWE-Bench Pro, scaffolds with near-identical resolve rates show sharply different detector signatures (structured plan absence 49.6% vs. 0.4%), reinforcing that prevalence shifts can be scaffold artifacts rather than quality signals.

Limitations

The authors concede several constraints directly. Detector thresholds were tuned on SWE-Bench Verified, so the transfer check demonstrates bounded directional carryover rather than threshold portability. Each task-setting pair is run once in the main corpus, outcome labels inherit SWE-Bench test-suite limitations, and Converge classifications measure reference-relative divergence, not absolute quality or human-validated root cause. Both benchmarks are Python issue-to-PR repair, leaving generalization to other languages open, and no intervention study tests whether the diagnostics improve practitioner outcomes. Execution metrics (duration, tokens, cost) are treated as collection-specific observations because they depend on CLI versions and provider behavior.

Conclusion

TraceProbe contributes a deterministic canonical representation, a frozen detector catalog, and reference-scoped alignment methodology that together add auditable process context to outcome-based evaluation. Its strongest results are same-task localization at file and function granularity, the stable search-loop clue, and demonstration that resolved runs differ in progress timing and failed work. The framework is positioned explicitly as inspection and comparison tooling — not a causal oracle or remediation method — and the natural open question it leaves is whether these diagnostics, paired with human-validated root-cause analysis, can drive interventions that measurably improve agent behavior under controlled comparison.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.