How I Stress-Tested LLM Coding Agents with a Real-World Task

    Evaluating large language models on real, complex codebases reveals far more than benchmark scores. This article documents a hands-on experiment running the same engineering plan through multiple mainstream coding agents, identifies three typical behavior patterns—including "shotgun coding" and hallucinated failure attribution—and shares a reproducible evaluation methodology plus practical engineering guardrails to reduce risk when using agents in production.

    Why Running a Real Project Beats Chasing Benchmarks

    When evaluating the coding ability of large language models, benchmark rankings are only a reference. What actually exposes problems is a codebase with genuine real-world complexity combined with a sufficiently detailed execution plan. “Sufficiently detailed” means the plan is broken down to the level of what each step does, which files to modify, and how to verify the result. Under this setup, differences between models get amplified quickly: capable models proceed step by step and pass the tests, while weaker ones repeatedly stumble on the most basic steps.

    I recently completed one such real-world test: the same project, the same plan, handed to several mainstream intelligent coding solutions. The outcome showed that the task itself was not hard—it involved no algorithmic innovation, just significant engineering effort and many constraints. Yet even in this kind of “follow the steps” scenario, the models showed dramatic divergence.

    Three Typical Behavior Patterns and Failure Modes

    1. Pass on the first attempt. Most solutions took the plan and executed it straight through, never asking additional questions, and ultimately passed the tests with comparable implementation quality. This suggests that for tasks with clear goals and explicit acceptance criteria, the baseline coding ability of today’s leading models is already quite reliable.

    2. Proactive clarification. One solution stopped midway to ask me about several details in the plan that were described imprecisely, then completed the task successfully. This is actually a plus—in real engineering, an agent that dares to ask clarifying questions is often more trustworthy than one that blindly makes changes.

    3. Systemic collapse. The most instructive case to review is the third one. It reported “compilation failure due to compiler cache issues” in the first two steps of the plan. When I told it to run the standard cache-cleaning command, it moved on to the next step without recompiling to verify, failed again, and once more blamed “severe cache problems.”

    This exposed three layers of capability deficits:

    • Incorrect failure attribution. Any developer with engineering experience knows that build-tool caches are rarely the primary cause of a compilation failure—the code being wrong is by far the most likely reason. Blaming the environment is classic hallucinated attribution.
    • Proceeding without verification. After performing a fix, it did not rebuild and re-verify, which shows it had not internalized “every step must pass verification” as an execution discipline.
    • Shotgun-style modification. After I explicitly pointed out that “the failure is because the code is wrong,” it began making large-scale, directionless changes: a line here, a line there—accumulating thousands of modifications over two hours without ever achieving a compiling build. This kind of undisciplined editing—no hypothesis, no rollback, no debugging strategy—is unacceptable in real collaboration.

    Additional Observations: The Limits of Frontend Demo Tasks

    Beyond backend engineering tasks, I tested several visualization-focused scenarios and drew some supplementary conclusions:

    • Visual output is generally adequate. The generated quality of lighting, particles, and similar effects was solid, indicating a firm grasp of common frontend visualization libraries.
    • Chain-of-thought hallucination. One solution claimed in its reasoning chain that it would implement a certain artistic stylization effect, but the final output showed no trace of it. A well-written reasoning chain is not the same as a well-executed result—these should be scored separately during evaluation.
    • Missing commonsense constraints. In one physics simulation task, the geometric proportions were visibly distorted, making operations that should be feasible according to common sense impossible to perform. Models can write code that “looks right” while remaining unreliable about physical-world intuition.
    • Long-tail tasks are unstable. For tasks requiring precise alignment of multiple components (such as reinforcement-learning training visualizations), most solutions failed due to misaligned components or broken interactivity. Notably, however, one solution had a mediocre presentation but a correctly converging training process—showing that “algorithmic correctness” and “engineering/presentation quality” are two orthogonal dimensions.

    Building a Reproducible Evaluation Methodology

    Based on this experiment, I summarized four evaluation recommendations:

    1. Use real tasks instead of toy problems. Choose a codebase with genuine complexity and prepare a detailed plan that includes verification criteria (tests, compilation, runtime checks).
    2. Don’t provide manual bailouts at critical steps. If you solve a failure point on behalf of the model, the evaluation becomes meaningless. At minimum, observe whether it can recover from its first failure.
    3. Record the types of failure modes. Was it misattribution, missing verification, directionless modification, or hallucinated reasoning? These labels are more informative than a binary pass/fail.
    4. Cross-check multiple tasks and dimensions. Test engineering implementation, visualization demos, and algorithm training once each—avoid drawing conclusions from a single data point.

    Practical Engineering Advice for Users

    Even when model capability falls short, you can reduce risk through process constraints:

    • Explicitly state in the agent’s system instructions: after every modification, rebuild and run the tests; when a failure occurs, read the error message first; do not make large-scale changes before locating the root cause.
    • Limit the scope of each modification (e.g., cap the number of files and lines changed), forcing the agent through a “hypothesize → verify → roll back” loop.
    • Break large plans into smaller subtasks, each with its own independent verification mechanism; on failure, discard the current step and retry rather than letting errors accumulate.
    • Introduce version-control checkpoints for generated code, rolling back entirely for any round of modifications that introduces more errors.

    Closing Thoughts

    The biggest lesson from this hands-on test: evaluating LLM coding ability cannot stop at “can it produce the code?”—you must look at its behavior after failure. Does it attribute failures accurately? Does it verify? Are its modifications directed? Leading solutions can already pass structured tasks in a single attempt, but the “shotgun coding” and hallucinated attribution exposed by one solution are a reminder that reliable agent execution still needs to be verified task by task in real work, with engineering processes serving as the safety net. For development teams, building an objective, reproducible internal evaluation mechanism is far more valuable than chasing leaderboard rankings.