How Much Static Structure Do Code Agents Need? A Study of Deterministic Anchoring
- URL: http://arxiv.org/abs/2606.26979v2
- Date: Thu, 02 Jul 2026 03:08:38 GMT
- Title: How Much Static Structure Do Code Agents Need? A Study of Deterministic Anchoring
- Abstract summary: LLM-based code agents navigate repositories through keyword search but miss the structural relationships that define how software actually works.<n>We investigate whether lightweight static analysis can provide deterministic anchors for these agents.<n>Our study identifies what we call the deterministic anchoring effect: static structure helps less by making agents "smarter" and more by making their navigation disciplined and reproducible.
- Score: 10.106526629957655
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: LLM-based code agents navigate repositories through keyword search but miss the structural relationships, such as call graphs, inheritance hierarchies, and configuration dependencies, that define how software actually works. This makes agent navigation stochastic and difficult to reproduce across runs. We investigate whether lightweight static analysis can provide deterministic anchors for these agents: stable structural facts injected as plain-text comments that constrain probabilistic exploration and make navigation more predictable. Starting from a strong baseline, Codex from OpenAI, we systematically inject varying granularities of structural annotations and measure their effects on localization, trajectory behavior, and run-to-run stability. Our study identifies what we call the deterministic anchoring effect: static structure helps less by making agents "smarter" and more by making their navigation disciplined and reproducible. Three observations support this finding: (1) Anchoring works: lightweight call/inheritance topology improves function-level localization (+2.2pp Func@5) and shortens trajectories (-1.6 interaction rounds); (2) Anchoring is scale-sensitive: the optimal granularity and directionality depend on repository characteristics, where denser semantics show diminishing returns and hub-heavy projects benefit from inverse-only links that expose "who-calls-me" without forward edges; (3) Anchoring stabilizes: tags raise link-following rate from 0.15-0.18 to 0.21-0.24, roughly halve run-to-run variance, and improve single-run reliability (Pass@1 +3.4 pp) on medium-scale repositories, at the cost of roughly 10% more input tokens. These observations suggest practical guidelines: default to lightweight topology on medium projects, prune forward edges in large repositories, and reserve dense tags for implicit-dependency cases.
Related papers
- Semantic Drift in Bug Resolution: How Behavioral Signals Propagate from Reports to Tests and Patches [18.727291516223115]
Desc2Fix is a framework for measuring semantic alignment between bug reports, triggering tests, and developer-written fixes.<n>We analyze 2,857 report-test-patch triplets from Defects4J and SWT-Bench using GPT-4o and DeepSeek-Chat.
arXiv Detail & Related papers (2026-07-20T22:32:23Z) - RepoMirage: Probing Repository Context Reasoning in Code Agents with Perturbations [51.43574078961796]
We introduce RepoMirage, a two-stage evaluation suite built on SWE-Bench Verified.<n>RepoMirage-Perturb applies three types of semantics-preserving repository-level perturbations, revealing a clear performance drop when correct solving requires broader context access.<n>We propose RepoAnchor, a structure-first prototype workflow that separates repository exploration from downstream problem solving.
arXiv Detail & Related papers (2026-05-25T06:26:43Z) - Tool-Call Dependency Structure is Linearly Decodable in LLM Agent Residual Streams [1.0971997884861282]
LLM agents produce trajectories whose calls form a directed dependency graph.<n>Prior structural probes have targeted static code or chain-of-thought text, not an agent's run-time call graph.<n>A low-capacity edge probe on the residual stream of Qwen3-32B decodes the tool-call dependency graph.
arXiv Detail & Related papers (2026-05-25T00:16:32Z) - How to Interpret Agent Behavior [56.59836196946289]
We introduce ACT*ONOMY, a taxonomy for describing and analyzing agent behavior at runtime.<n>By providing a shared vocabulary, ACT*ONOMY helps researchers, agent designers, and end users interpret agent behavior more consistently.
arXiv Detail & Related papers (2026-05-13T14:52:40Z) - LARGER: Lexically Anchored Repository Graph Exploration and Retrieval [9.90137784523552]
repository-level coding agents must first localize the files and symbols relevant to a task.<n>Existing approaches often require separate graph tools or stages that fragment the agent's interaction loop.<n>We introduce LARGER, a lexically anchored active-set retrieval framework that starts from lexical matches, aligns them to graph anchors, and performs confidence-filtered local expansion within the agent's existing search loop.
arXiv Detail & Related papers (2026-05-08T05:03:46Z) - LEADER: Learning Reliable Local-to-Global Correspondences for LiDAR Relocalization [44.37632368250295]
We propose LEADER, a robust LiDAR-based relocalization framework enhanced by a simple, yet effective geometric encoder.<n>Experiments on the Oxford RobotCar and NCLT datasets demonstrate that LEADER outperforms state-of-the-art methods.
arXiv Detail & Related papers (2026-04-13T11:52:29Z) - GESS: Multi-cue Guided Local Feature Learning via Geometric and Semantic Synergy [31.32050433924969]
Robust local feature detection and description are foundational tasks in computer vision.<n>Existing methods rely on single appearance cues for modeling, leading to unstable keypoints and insufficient descriptor discriminability.<n>We propose a multi-cue guided local feature learning framework that leverages semantic and geometric cues to enhance detection robustness and descriptor discriminability.
arXiv Detail & Related papers (2026-04-07T02:57:26Z) - Route-Induced Density and Stability (RIDE): Controlled Intervention and Mechanism Analysis of Routing-Style Meta Prompts on LLM Internal States [10.639846833695806]
We quantify internal density via activation sparsity, (C2) domain-keyword attention, and (C3) output stability via predictive entropy and semantic variation.<n>We present RIDE as a diagnostic probe for calibrating routing design and uncertainty estimation.
arXiv Detail & Related papers (2026-03-31T03:19:36Z) - Dynamic analysis enhances issue resolution [53.50448142467294]
DAIRA (Dynamic Analysis-enhanced Issue Resolution Agent) is an automated repair framework that embeds dynamic analysis into the agent's reasoning cycle.<n> Driven by a Test Tracing-Driven methodology, DAIRA utilizes lightweight monitors to extract critical runtime data.<n>When powered by Gemini 3 Flash Preview, DAIRA establishes a new state-of-the-art (SOTA) performance, achieving a 79.4% resolution rate on the SWE-bench Verified dataset.
arXiv Detail & Related papers (2026-03-23T14:48:54Z) - TopoCurate:Modeling Interaction Topology for Tool-Use Agent Training [53.93696896939915]
Training tool-use agents typically rely on Supervised Fine-Tuning (SFT) on successful trajectories and Reinforcement Learning (RL) on pass-rate-selected tasks.<n>We propose TopoCurate, an interaction-aware framework that projects multi-trial rollouts from the same task into a unified semantic quotient topology.<n>TopoCurate achieves consistent gains of 4.2% (SFT) and 6.9% (RL) over state-of-the-art baselines.
arXiv Detail & Related papers (2026-03-02T10:38:54Z) - A Refreshed Similarity-based Upsampler for Direct High-Ratio Feature Upsampling [54.05517338122698]
A popular similarity-based feature upsampling pipeline has been proposed, which utilizes a high-resolution feature as guidance.<n>We propose an explicitly controllable query-key feature alignment from both semantic-aware and detail-aware perspectives.<n>We develop a fine-grained neighbor selection strategy on HR features, which is simple yet effective for alleviating mosaic artifacts.
arXiv Detail & Related papers (2024-07-02T14:12:21Z) - Scope Head for Accurate Localization in Object Detection [135.9979405835606]
We propose a novel detector coined as ScopeNet, which models anchors of each location as a mutually dependent relationship.
With our concise and effective design, the proposed ScopeNet achieves state-of-the-art results on COCO.
arXiv Detail & Related papers (2020-05-11T04:00:09Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.