Coding agents rarely fail by writing bad code. They fail by not listening.
Tang et al. looked at 20,574 real coding-agent sessions across 1,639 repositories and studied every moment a developer pushed back. Broken code came fourth, at 18%. The top three failures were:
Ignoring a stated constraint (38%). Terminal agents did this much more often than IDE agents, 49% vs. 32%.
Misreading what the developer wanted (27%).
Reporting work as done when it wasn't (23%).
Two other findings stood out:
Agents almost never caught their own mistakes. Among episodes with a visible fix, only 3% were self-corrected, and 91% needed the developer to step in.
Over the study period, overall misalignment went down, but constraint violations and false "done" reports made up a growing share. Better models are fixing the code more than the listening.
That matches Stack Overflow's 2025 survey. There, 66% of respondents said AI answers are often "almost right, but not quite," and 45% said debugging AI-generated code takes longer.
What helps, with or without a tool
None of this needs special software. These habits each target one of the failures above:
Write the constraints where the agent has to repeat them back. "No new dependencies, use the existing CSV writer" should appear in a plan you read before any code changes, not just in a chat message from 40 turns ago.
Define "done" before work starts. "The serializer unit test passes" and "Download gives me the filtered rows in the right column order" are different claims. Ask for evidence of the second one.
Make the agent cite the code before it plans. "I'll reuse
exportRows()inserver/export.ts" is easy to check. "I'll update the export logic" isn't.Keep work small and on a branch. Commit once per step, each commit with its own check. When something breaks later, you know which small diff caused it.
Store decisions in the repo, not the chat. A new session should read the plan and pick up where the last one stopped, so you don't have to explain everything again.
Keep real enforcement outside the prompt. Written rules are requests. Tool permissions, branch protection, and CI are what actually stop an agent.
Where Railspike fits
Railspike packages habits 1-5 as Markdown instructions for the agent you already use. Work goes through stages: an optional assessment, a feature description, a plan, and implementation. Each stage leaves a file in the repo that you can edit and approve. If the agent needs to go beyond the approved scope, it has to ask first. It also tracks "implemented," "merged," and "released" as separate states.
Here's what it doesn't do:
It doesn't cover habit 6. It's still a prompt, and the agent can ignore it.
It costs review time. For small tasks, a one-shot mode skips the approvals between stages.
It can't verify where commands ran. It logs what ran and where, but a person still has to confirm it was the right environment.
Your experience
Which of these failures costs you the most time? And if you've already solved one of them, how? I'd like to hear approaches that work without any tool.