← Latest papers
💻 computer science

Engineering Pitfalls in AI Coding Tools: An Empirical Study of Bugs in Claude Code, Codex, and Gemini CLI

This paper presents the first empirical study of engineering pitfalls in AI-assisted coding tools by systematically analyzing over 3,800 GitHub bugs across Claude Code, Codex, and Gemini CLI, revealing that functionality issues and API/integration errors are the primary causes of failures that predominantly disrupt tool invocation and command execution.

Original authors: Ruixin Zhang, Wuyang Dai, Hung Viet Pham, Gias Uddin, Jinqiu Yang, Song Wang

Published 2026-03-24
📖 5 min read🧠 Deep dive

Original authors: Ruixin Zhang, Wuyang Dai, Hung Viet Pham, Gias Uddin, Jinqiu Yang, Song Wang

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you've hired a brilliant, hyper-fast apprentice to help you build a house. This apprentice (the AI) is incredibly smart; it can read blueprints, mix concrete, and even design new rooms just by listening to your voice. You call this apprentice Claude Code, Codex, or Gemini CLI.

You expect them to be perfect. But in reality, they are like a genius apprentice who is constantly tripping over their own shoelaces, getting confused by the weather, or arguing with the delivery truck driver.

This paper is a massive "autopsy" of 3,800+ mistakes these AI coding tools made. The researchers didn't just look at what the AI wrote; they looked at why the whole system crashed. Here is the breakdown of their findings, translated into everyday language.

1. The Big Picture: It's Not the Brain, It's the Body

Most people think AI coding tools fail because the "brain" (the Large Language Model) is hallucinating or making up facts.

  • The Reality: The brain is actually doing okay. The problem is the body and the hands.
  • The Analogy: Imagine a Formula 1 driver (the AI) who is a genius. But the car (the tool) has a flat tire, the fuel line is kinked, and the GPS is disconnected. The driver isn't the problem; the car's engineering is.
  • The Stat: 67% of all bugs were about the tool simply failing to do its core job (like trying to save a file and failing). Only a tiny fraction was the AI "thinking" wrong.

2. The Three Main Culprits (Root Causes)

The researchers dug into why these tools broke. They found three main villains:

  • The "Plug-and-Play" Disaster (API & Integration Errors - 21.4%):

    • The Metaphor: You try to plug a toaster into a European outlet while standing in the US. The shapes don't match, or the voltage is wrong.
    • What happened: The AI tool tried to talk to other software (like your computer's file system or a cloud server), but the "handshake" failed. The tools didn't speak the same language, or the keys (passwords) were expired.
  • The "Instructions Were Wrong" Problem (Configuration & Setup - 15.9%):

    • The Metaphor: You bought a high-tech oven, but you forgot to turn on the gas, or you set the temperature to "Bake" when you meant "Broil."
    • What happened: The tool was installed incorrectly, or the user's computer settings (like which version of a programming language they had) didn't match what the tool needed.
  • The "Confused Environment" (Compatibility - 10.5%):

    • The Metaphor: A chef who is great at cooking in a professional kitchen but gets lost in a tiny camper van kitchen.
    • What happened: The tool worked perfectly on a Mac but crashed on Windows, or it worked in one type of terminal window but not another.

3. What Users Actually Saw (Symptoms)

When these tools broke, what did the users see?

  • The "Silent Glitch" (API Errors - 18.3%): The tool just stopped talking to the server. It's like trying to call a friend, and the line just goes dead.
  • The "Frozen Screen" (Terminal Problems - 14%): The text on the screen got messed up, or the cursor disappeared. It's like a TV screen turning into static.
  • The "Command Fail" (12.7%): You told the tool to "Build the house," and it just said, "I can't do that," or it tried to do it and crashed immediately.

4. Where the Breakdown Happened (Location)

The researchers mapped the tools like a building with six floors. Where did the leaks happen?

  • Floor 1: The Front Door (Tool Orchestration - 37.6%): This is where the AI tries to open the door to other tools. This is the most fragile part. It's like a doorman who keeps forgetting to unlock the gate.
  • Floor 2: The Construction Site (Command Execution - 25%): This is where the actual work happens. The AI tries to run a command (like "delete this file"), and the system says, "No, I can't run that."
  • The "Brain" (LLM Reasoning): Surprisingly, the actual AI thinking part was not the most common place for bugs. The tool failed before the AI even got a chance to think deeply.

5. The Takeaway: What Should Builders Do?

The paper offers a roadmap for fixing these tools, using three simple rules:

  1. Stop Blaming the Brain: Don't just try to make the AI smarter. Fix the plumbing, the wiring, and the connections. The system is failing because the parts don't fit together, not because the AI is dumb.
  2. Be Explicit: If the tool needs a specific version of a program to run, say it clearly. Don't assume the user knows. Check the "plug" before you try to turn it on.
  3. Speak Up When Lost: If the tool isn't sure if it can do something, it should say, "I'm not sure if I have permission to do that," instead of just crashing or guessing.

Summary

Building an AI coding tool isn't just about training a smart robot; it's about building a reliable robot butler. Right now, the butler is smart, but it keeps tripping over the rug, forgetting where the keys are, and getting confused by the doorbell. This study tells engineers: "Fix the rug, organize the keys, and install a better doorbell before you worry about making the butler smarter."

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →