- The paper introduces a two-agent framework that combines agent-directed depth-first codebase traversal with a checkpointed issue-resolution workflow for repository-level software engineering.
- SWE-Adept improves function localization by up to 5.4% and SWE-Bench Pro resolve rates by up to 4.7% over prior frameworks, while its structural retrieval generally uses fewer localization tokens.
- The framework reduces failures from incorrect hypotheses, poor localization, and unrecoverable edits, but its higher repair-stage token cost, proprietary-model dependence, and Python-only evaluation limit current generalizability.
SWE-Adept is a two-agent LLM framework for repository-level software engineering that pairs a dedicated issue localization agent with an issue resolution agent. The paper's central claims are that (1) agent-directed depth-first traversal over a lightweight code-structure tree improves localization accuracy while consuming fewer tokens than graph-based baselines, and (2) a tool-memory interface exposing Git-based checkpointing to the agent enables reliable branching, reversion, and multi-hypothesis exploration during repair. Evaluation on SWE-Bench Lite and SWE-Bench Pro reports function-level localization gains of up to 5.4% and end-to-end resolve-rate gains of up to 4.7% over prior frameworks.
Motivation and problem setting
The authors identify two failure modes in existing agentic SWE systems. First, context management during codebase search is poor: coarse-grained indexing forces agents to pull entire files into context to disambiguate candidates, and algorithm-controlled graph traversal with fixed-hop expansion introduces breadth-first, indiscriminate expansion that injects issue-irrelevant content. Second, resolution pipelines such as SWE-agent operate as free-form "think-and-edit" loops without explicit planning, progress tracking, or checkpointing; without state logging aligned to execution milestones, agents cannot reliably revert failed edits or reset to attempt alternative repairs. The paper notes that SWE-Search and Claude Code do provide checkpointing, but in SWE-Search checkpoints are managed by the runtime and inaccessible to the agent through its tool interface, and in Claude Code they are surfaced primarily for user control — leaving agent-driven version control unaddressed.
Codebase representation
Indexing proceeds at definition level: tree-sitter parses the repository into code units consisting of function and class definitions, with residual top-level logic segmented into fixed 200-line chunks for full coverage. Each unit carries metadata (name, file path and line span, raw text). Rather than building a monolithic global dependency graph, each unit stores a lightweight adjacency list of child-unit identifiers (file_path:definition_name) derived from "contains" and "invokes" edges. Accessing a unit therefore returns its local adjacency directly, avoiding a separate dependency lookup during traversal.
Issue localization via agent-directed depth-first search
The localization agent searches at multiple granularities (file-level retrieval, definition lookup, line/variable content matching), with find_child_unit making navigation explicit in the action space. Crucially, all tools return only structural summaries — file skeletons, definition signatures, child-unit identifiers, and concise previews — rather than full source. Starting from entities mentioned in the issue description, the agent recursively prioritizes one child unit per step, following a single most-promising dependency path until it judges the path issue-unrelated or sufficiently understood, then moves to the next entry point. After search terminates via finish_search, a two-stage filter runs: stage one shortlists candidates using lightweight heuristics (previews, location metadata), and only then does the runtime load full source for the shortlist so the agent can perform content-based re-ranking. This deferral of full-content loading is the mechanism by which redundant retrieval is minimized.
Structured issue resolution with checkpointed version control
The resolution agent is built on SWE-agent infrastructure but adds two CLI tool families interfacing with a shared working memory (a persistent JSON-serialized registry):
- hypothesis_plan maintains hypotheses (alternative solutions) with status tags, hypothesis-associated to-do lists of fine-grained edit/test actions, and logged insights from execution feedback. To-do lists are dynamic: test failures can trigger expansion.
- hypothesis_git wraps sequences of low-level Git operations into single high-level commands with built-in error handling:
init_base checkpoints the original state, start_hypothesis creates isolated branches, commit_todo enforces "one to-do = one commit" checkpointing, revert_to restores a specific semantic-step checkpoint on a new branch, and compare_hypotheses / merge_solution support final selection and clean patch generation.
Because the agent references checkpoints by semantic identifiers (hypothesis names, to-do contents) rather than Git hashes stored in-context, it avoids tracking non-semantic hashes across long trajectories. The workflow proceeds from reproduction-script confirmation, through hypothesis-driven repair (single hypothesis when the fix is clear, multiple when uncertain), to cross-hypothesis comparison and merge onto the original code state.
Experimental results
Localization is evaluated with Acc@3 (file) and Acc@5 (function); resolution uses resolve rate. Against embedding baselines (CodeSage-Large, CodeRankEmbed), SWE-agent, RepoGraph, OrcaLoca, and LocAgent, using both GPT-5.2 and Claude-Sonnet-4.5:
On localization, SWE-Adept mostly consumes fewer tokens than the graph-based approaches despite higher accuracy (e.g., 202k vs. 146–268k tokens per instance among GPT-5.2 configurations on SWE-Bench Lite), which the authors attribute to context-efficient structural retrieval. On resolution, token counts are higher than baselines (e.g., 815k vs. 638k for GPT-5.2 on SWE-Bench Pro), reflecting the cost of multi-hypothesis exploration — a trade-off the paper presents but does not deeply analyze.
Behavioral analysis shows find_child_unit is the dominant localization action, confirming dependency-aware multi-hop navigation; accuracy rises from zero to moderate search depth and declines at greater depth, with SWE-Adept's margin over OrcaLoca widening as depth increases. On the resolution side, multi-hypothesis branching, dynamic to-do expansion, and checkpoint-based reversion are all frequently observed, and resolve rate degrades more gracefully than baselines as hypothesis count grows.
Ablations and error analysis
Replacing either specialized module with the default SWE-agent module reduces resolve rate on SWE-Bench Pro (47.3% → 45.3% without specialized localization, → 44.0% without specialized resolution), indicating complementary contributions. A pointed ablation concerns raw Git usage: prompting SWE-agent to use raw Git commands yields 67.0% on SWE-Bench Lite (up from 65.7%) but degrades performance on SWE-Bench Pro (38.7% vs. 41.3%), and stripping hypothesis_git and working memory from SWE-Adept similarly loses gains (69.0% and 43.3%). The authors attribute this to long-horizon unreliability of direct Git manipulation and growing checkpoint-tracking burden in context. Error analysis of instances uniquely failed by SWE-agent attributes failures to incorrect hypotheses (9), localization errors (9), and failed recovery from bad edits (6); SWE-Adept reduces failures in all three categories.
Limitations and open questions
The paper concedes several constraints. All results use proprietary frontier models (GPT-5.2, Claude-Sonnet-4.5); transfer to open-source models, e.g., via agentic reinforcement learning, remains untested. Evaluation covers Python codebases only — the framework is claimed language-agnostic, but multilingual parsing/indexing is unimplemented and unvalidated. Results are from single runs without variance reporting, and the SWE-Bench Pro evaluation is restricted to instances whose ground-truth patches touch at most 3 files and 5 functions, sampled down to 150 instances, so behavior on the hardest long-horizon instances is not characterized. Whether the token overhead of multi-hypothesis resolution justifies its resolve-rate gains under cost-constrained deployment is left open, as is whether semantic-step checkpointing scales when hypothesis counts grow large.
Conclusion
SWE-Adept demonstrates that selective, agent-controlled depth-first traversal with deferred full-content loading outperforms both embedding retrieval and fixed-hop graph traversal for issue localization, and that exposing structured, memory-backed version-control primitives to the agent materially improves long-horizon repair reliability. The evidence supports the joint contribution of the two agents, though the framework's dependence on proprietary models, its Python-only validation, and its elevated resolution-stage token cost bound the generality of the reported conclusions.