TL;DR
This paper investigates whether giving AI coding agents access to interactive debuggers (like Python’s pdb) actually improves their performance compared to a standard shell interface. By introducing a new metric called pass$_X$@$k$, the authors demonstrate that the perceived benefits of debuggers are often just a result of random chance; in reality, simply running a shell-based agent twice is more effective than combining one shell run with one debugger run.
What Problem Does This Paper Address?
Most state-of-the-art coding agents debug like a developer from the 1970s: they insert print statements, run the code in a terminal, and read the stack traces. While human developers rely heavily on interactive debuggers to step through code and inspect live runtime state, it hasn't been clear if LLMs can—or should—do the same.
Previous research often added debuggers as an extra tool on top of existing ones. This makes it impossible to tell if the improvement came from the debugger itself or simply from giving the agent more ways to interact with the environment. This paper seeks to isolate the "debugger effect" by comparing two identical agents where only the execution interface differs: one gets a standard bash shell, and the other gets a persistent pdb session.
Methods
The researchers built two "matched" agent architectures on a common harness:
- bash-agent: Uses
run_bashto execute arbitrary shell commands. - pdb-agent: Uses a persistent debugger session. To prevent the agent from "flailing" (making blind edits without looking at the state), the authors implemented an Edit Gate: the agent cannot use editing tools until it has successfully executed at least one debugger command in that turn.
To evaluate them fairly, they introduced pass$_X$@$k$. While the standard pass@k measures the success rate of $k$ runs of the same agent, passX@k (cross-agent pass@k) estimates the probability that at least one agent from a diverse portfolio (e.g., one bash and one pdb) succeeds. This allows researchers to see if tools are truly complementary or if they are just solving the same problems with different degrees of luck.
Datasets
The study used SWE-bench Verified, a human-validated subset of 500 real-world GitHub issues. They evaluated two open-weight models:
- GPT-OSS-120B
- Nemotron-3-Ultra-550B
Key Insights and Ideas
- The "Illusion of Specialization": In a single run, it might look like the debugger solved a "hard" problem the bash agent missed. However, when you run both agents multiple times, those "exclusive" solves mostly disappear. This suggests that the difference was due to stochastic variance (the model getting lucky) rather than the debugger having a unique capability.
- Bash is the "Swiss Army Knife": The shell is incredibly general. In one instance, the bash agent even "cheated" by using
gitto find the original gold patch in the repository's history—a "leak" the researchers had to manually plug. - The Cost of Statefulness: For GPT-OSS, using the debugger was significantly less efficient, roughly doubling the token cost per solved problem compared to the bash interface.
Key Results
- Bash Wins: Across both models, the bash-agent significantly outperformed the pdb-agent. For GPT-OSS, the bash-agent solved 56.7% of tasks (pass@1) compared to only 40.3% for the pdb-agent.
- Redundancy > Diversity: The
passX@2results showed that two runs of the bash agent were better than a "diverse" pairing of one bash and one pdb run. - Variance is King: Figure 4 illustrates how the "exclusive" solves for each tool shrink as you increase the number of seeds, proving that much of what we think is "tool specialization" is actually just noise.
Limitations and Future Work
The authors acknowledge several limitations:
- Benchmark Bias: SWE-bench Verified is Python-only and may not contain enough "long-horizon" or state-dependent bugs that truly require a debugger.
- Model Training: Models like Nemotron are likely trained more heavily on shell interactions than on
pdbcommand syntax. - Complexity Strata: The dataset has very few "hard" bugs (e.g., those requiring changes to 3+ files), making it difficult to conclude if debuggers help more with high-complexity tasks.
Future work will involve fine-tuning models specifically on debugger usage and expanding the evaluation to more diverse, stateful failure scenarios.
Summary updated