Apply to my task
arXiv:2610.25826 ★ 83 Oct 19, 2026

Bug Hints for Coding Agents: A List of “Suspicious Spots” Barely Helps, the Cause Is What Matters

Key result

A list of “suspicious spots” from a separate tool doesn't raise the share of fixed bugs. More often it even lowers it slightly. This is a findings paper, not a new technique. It lets you skip paying for a separate “bug finder” and write better tasks for Claude Code or Cursor. The trick: the agent needs a diagnosis, not an address. The agent is already good at searching the project on its own (it barely needs bug localization, aka fault localization). But knowledge of the cause is something search won't turn up. Exact locations save up to 39% of repair tokens, but the bug finder itself spends more than it saves.

01

TL;DR

The study tests whether a coding agent benefits from a list of “suspicious spots” in the code produced by a separate tool (fault localization, FL, “finding where the bug lives”). The list was simply appended to the task description. The agent was still free to search the whole project. The result: the hint shifts where the search starts, but does not raise the share of fixed bugs. More often it even nudges that share down a little.

The headline finding: a smart bug-finding tool does not make the agent any smarter. The agent is already good at finding code on its own by searching and reading files. The hint mostly changes the first few steps: the agent reaches the right file faster. If the list is wrong, the agent checks it, realizes it was sent on a wild goose chase, and keeps searching. That burns steps and tokens. Precise locations really do save tokens (up to 39% on the repair), but the localization tool itself spends more than it saves. You end up behind on both cost and quality.

What works better: a hint that explains the cause of the bug instead of just naming a location. It delivered a gain on top of the coordinates alone. Hints matter most when the bug report has few clues about the location: no stack trace, no function or file names. If the report already contains such clues, the hint adds almost nothing.

Want this for your own case? Apply this study to your task: AI adapts its method to what you are working on and writes the prompt.

02

Method Blueprint

This is a findings paper, not a technique. Below is a blueprint of the practical takeaway: what to put in the agent's task.

STEP 1: Don't bolt a separate “bug finder” in front of the agent
        → the agent searches on its own, cheaper and no worse

STEP 2: Describe the symptom + how to reproduce → give location clues if you have them
        (error, stack trace, function/file name)

STEP 3: Add the CAUSE of the bug (a hypothesis) along with the location
        → the cause gives more than the location alone

STEP 4: Label the hint as a “hypothesis to verify”
        → the agent may go beyond it

STEP 5: Definition of done: a test/reproduction
        → the agent checks its own work

All of this goes to the agent in a single message.

03

Example in Practice

Task: You run an online store on Django. The inventory export to Amazon occasionally sends a negative stock quantity. You fire up Claude Code or Cursor. You've already noticed the bug shows up after an order is returned.

Prompt:

Bug: the inventory export to the marketplace sometimes sends negative values.

How to reproduce: place an order for 3 units of a product, create a return 
for 5 units (the return is created from the admin panel), run `python manage.py sync_stock`. 
In the log: "stock=-2 sku=AMZ-48213".

My hypothesis about the cause: on a return, stock is incremented twice: 
first by the post-save signal on the return, then again inside 
the stock recalculation function. That's why the discrepancy accumulates, 
and the export doesn't clamp the value at zero.

Where I suspect it is: the orders/signals.py and stock/services.py modules. 
This is a starting point, not a boundary. If the cause is somewhere else, go there.

What I need: find the real cause, fix it, add a test that 
fails before the fix and passes after. Show which files you changed and why.

Result: The agent will first check the modules you named and confirm or rule out the hypothesis. Then, if needed, it will keep digging through the project. You get a fix, a test, and an explanation of which files were touched. The cause hypothesis cuts down on blind searching, and the “not a boundary” caveat keeps the agent from getting stuck on a wrong guess.

04

Why It Works

Weakness: A list of locations with no explanation gives the model nothing but coordinates. If the coordinates are wrong, the agent wastes steps checking them. If they're right, it would have found them anyway by searching the project, so the gain is small. That's why the average outcome came out at zero or negative.

Strength: The agent is good at searching and double-checking. It doesn't take the hint on faith: it reads the code, cross-checks, and widens the search when things don't match. Even with completely false hints, it often still reaches the right code.

How to use it: Give the agent what it doesn't have and can't find by searching: knowledge of the cause. Your understanding of “why it breaks” saves more steps than “where it lives.” And labeling it “this is a hypothesis” preserves the agent's right to verify.

Control knobs: - The more location clues already in the bug report, the less you need a separate hint. Then the symptom and a test are enough. - The fewer clues (the user just wrote “the export is broken”), the more valuable your hypothesis about location and cause. - The phrase “a starting point, not a boundary” lowers the risk of the agent fixating on the wrong spot. - A definition of done (a test) forces the agent to verify the fix instead of stopping at a plausible-looking patch.

05

Prompt Template

The paper has no verbatim prompt: the authors simply appended the list of locations to the task description. The template below is built from their findings (the cause matters more than the location, the hint is a hypothesis).

Bug: {symptom, what the user sees}

How to reproduce: {steps or command}
Actual result: {log, error, stack trace}
Expected result: {what should happen}

My hypothesis about the cause: {why you think it breaks}

Where I suspect it is: {files/functions}. This is a starting point, 
not a boundary. If the cause is somewhere else, go there.

What I need: find the real cause, fix it, add a test that 
fails before the fix and passes after. Explain which files you changed and why.

Fill in: the symptom and reproduction steps (the more concrete, the less the agent searches blindly), the cause hypothesis (if you don't have one, honestly write “cause unknown” and don't make one up), the suspicious locations (if you don't know them, delete the whole line).

06

Limitations

⚠️ Not confirmed beyond bug repair: The experiments covered fixing bugs in code (Python and Java). Transfer to other agentic tasks (building features, refactoring, data analysis) was not tested in the paper.

⚠️ The cause hint was tested as “gold”: The cause descriptions were taken from the reference fixes, so they were correct by construction. Your hypothesis may be wrong, and then the gain shrinks. That's why the hint should be labeled as a hypothesis.

⚠️ No guarantees: Location hints don't do catastrophic damage, and in a few cases they even helped slightly. But almost none of the methods shows a consistent gain.

⚠️ The reference is incomplete: The locations from a single reference fix don't cover every place where successful agents actually edited code. The agent may fix the bug somewhere else, and that's not a mistake.

⚠️ Some data comes from a summary: For details of the agent-behavior analysis and the cause experiments, I'm relying on the paper's abstract. The full tables for those sections are missing from the available text.

07

How They Studied It

The researchers took six state-of-the-art fault localization methods. Three work from the issue description (SWE-bench Verified, 500 Python tasks), three from a failing test (Defects4J, 854 Java bugs). Each method was run with three models and the same simple agent, whose only tool was the command line. The comparison: an agent with no hint versus an agent with the same description plus a list of locations. That added up to 16,248 runs. The main metric: the share of bugs fixed on the first attempt (pass@1).

The result was a surprise: in 17 out of 18 comparisons, the hint made results worse. The spread ran from −4.45 to +0.40 percentage points. In 16 of 18 cases the difference was statistically indistinguishable from noise. Then they looked inside the runs. The hint really does change how the search starts: the agent opens the right files sooner. But after that it double-checks anyway, and with a wrong hint it goes off searching further. So the early head start doesn't turn into more fixed bugs.

Next, the authors gave the agent “gold” hints: exact locations and a description of the cause, taken from the reference fixes. They tested four kinds of tasks, including tasks with images and large multi-location edits. Conclusions: exact locations save tokens (up to 39.2%), hints matter more when the bug description is thin, and adding the cause gives a gain on top of locations alone. A separate finding: the locations from one reference fix don't cover every path to a successful repair. The takeaway for practitioners: in your task, write “why,” not “where.”

08

Adaptations and Extrapolations

🔧 Technique: a confidence label → controlled agent trust

Add a confidence level to the prompt:

My hypothesis about the cause: {hypothesis}. Confidence: low. 
Verify it against the reproduction first, before changing any code.

Effect: the agent tests the hypothesis first instead of building a fix on top of it. This is my adaptation; the paper doesn't test it.

🔧 Technique: add a rule about hints to the agent's instructions file

In CLAUDE.md or AGENTS.md:

If the task lists “suspicious locations,” treat them as a hypothesis. 
Verify against the reproduction. If it doesn't hold up, keep searching; 
don't bend the fix to fit the hint.

This extrapolates the paper's finding that the agent can move past false hints but spends steps doing so. The rule makes that behavior explicit. The effect of this exact wording has not been measured.

09

Resources

  • Paper: From Finding to Fixing: How Useful is Fault Localization for Agentic Program Repair?
  • Authors: Xinyu Shi, Zhou Yang, An Ran Chen (University of Alberta, Canada)
  • Benchmarks: SWE-bench Verified, Defects4J v3.0.1, SWE-bench Multimodal, SWE-bench Pro
  • Agent scaffold: mini-swe-agent
  • Fault localization methods tested: LocAgent, CoSIL, OrcaLoca, AutoFL, SoapFL, FlexFL

Research digest

Key result

A list of “suspicious spots” from a separate tool doesn't raise the share of fixed bugs. More often it even lowers it slightly. This is a findings paper, not a new technique. It lets you skip paying for a separate “bug finder” and write better tasks for Claude Code or Cursor. The trick: the agent needs a diagnosis, not an address. The agent is already good at searching the project on its own (it barely needs bug localization, aka fault localization). But knowledge of the cause is something search won't turn up. Exact locations save up to 39% of repair tokens, but the bug finder itself spends more than it saves.

Principle

The agent finds the bug's location on its own; it won't find the cause. A list of locations just moves where the search starts: the agent reaches the right file faster. If the list is wrong, it checks it, realizes it's been sent on a wild goose chase, and keeps looking. Steps and tokens wasted. A hint with the cause works differently. The agent gets not “look here” but “here's why it breaks.” Coordinates tell it where to look; the cause tells it what to look for. It's the difference between a street address and “there's a leaking pipe in the apartment.” You can find the address yourself, but you'd never guess about the pipe without being told.

Why it works

A list of locations with no explanation only gives coordinates. Wrong coordinates cost steps to check. Right ones the agent would have found anyway, so the gain is small. Net result on average: zero or negative. The agent doesn't take the hint at its word. It reads the code, cross-checks, and widens the search when things don't match. Even with completely false hints, it often reaches the right code. A location hint duplicates what the agent can already do; a cause hint gives it what it lacks. The cause delivered a gain on top of the coordinates alone. There's one more lever. If the bug report already has clues (an error stack trace, a function name, a file), the hint adds almost nothing. If it just says “the export is broken,” your hypothesis is worth the most. The cost hit matters too: a separate bug finder burns more tokens than it saves.

When to apply

Bug fixing by an agent (Claude Code, Cursor and the like) → especially when the bug is vaguely described: no stack trace, no function or file names, but you have a hunch about why it breaks. If the report already has location clues, the symptom, reproduction steps and a test are enough. NOT a fit: bolting a separate “bug finder” tool in front of the agent for the sake of quality. Testing covered only bugs in Python and Java. The conclusion wasn't tested for writing features, refactoring code or data analysis. The causes in the paper came from reference fixes, so they were correct by construction. Your hypothesis may be wrong, which is why you label it as a hypothesis.

Mini recipe

1. Ditch the separate bug finder: the agent searches on its own, and that's cheaper. 2. Describe the symptom: what the user sees, how to reproduce it, what's in the log and what should happen. 3. Add the cause: one or two sentences on why you think it breaks. Don't know the cause? Honestly write unknown. Don't make one up. 4. Name suspicious locations if you have any: and immediately add “this is a starting point, not a boundary.” Don't know the locations? Delete the whole line. 5. Draw a finish line: a test that fails before the fix and passes after. The agent will check its own work. 6. Ask for a report: which files it changed and why. If it strayed from your hypothesis, you'll see it right away.

Examples

[BAD]: `Bug in the inventory export. Suspicious files: orders/signals.py, stock/services.py, stock/export.py, orders/models.py. Fix it.` [GOOD]: `Bug: the inventory export to the marketplace sometimes sends negative values. How to reproduce: order 3 units, return 5 from the admin panel, then python manage.py sync_stock. In the log: stock=-2 sku=AMZ-48213. My hypothesis: on a return, stock is incremented twice, first by the post-save signal on the return, then inside the recalculation function. The export doesn't clamp the value at zero. Where I suspect it is: orders/signals.py and stock/services.py. This is a starting point, not a boundary. If the cause is somewhere else, go there. What I need: find the real cause, fix it, add a test that fails before the fix and passes after. Explain which files you changed and why.` In the bad example the agent gets four addresses and zero understanding. In the good one it has the symptom, a reproduction, the cause, and the right not to take your word for it.

In plain words

LLM agents fix software by reasoning through connections, not by blindly firing at files. When you hand an AI coder a ready-made list of “suspicious spots” from classic fault localization, you expect a speedup, but what you get is a total dud. The model has no idea why those lines were picked: to it they're just blind coordinates that throw off its own reasoning process.

It's like taking your car to the shop with a knock in the engine and flatly telling the mechanic: “I think it's the muffler.” A good mechanic would have found the problem under the hood anyway, but thanks to your tip he'll waste precious time poking around the tailpipe, because “the customer asked me to check it.”

The study surfaced a cynical fact: outside tips don't raise the fix rate, and often even drag it down. If the suggested coordinate is off, the agent stalls and burns through its action budget chasing a false lead. And if the coordinate is right, a capable stack like Claude Code or Cursor finds it in a couple of steps with a plain repo search, no crutches required.

They tested on automated bug-fix benchmarks, but the same rakes are waiting for any AI assistant. Whether it's a broken export in Django or a wonky SQL query, dry lists of suspicious spots with no context do harm. Feeding the agent raw guesses from third-party tools or blind dumps is a sure way to torch the context window and confuse the model.

Bottom line: stop playing “helpful backseat navigator” and rubbing the model's nose in files. Give it the symptom and a reproducible case, and it'll find its own way to the bug. Business-logic context is what wins, while trying to steer the process with early fault localization just gets in the agent's way.

AI lab assistant

Apply this study to your task

Describe what you're working on. AI takes the method and the measured results from this paper and adapts them to your case, or writes a ready prompt built on them.

Based on Bug Hints for Coding Agents: A List of “Suspicious Spots” Barely Helps, the Cause Is What Matters arXiv:2610.25826

Sign in to apply this study New accounts get 50 free credits.