All notes

INSIGHT

Jul 5, 2026

Dan Luu's Notes on Agentic Coding Loops: What Actually Breaks

Dan Luu's analysis of agentic coding workflows surfaces the failure modes that benchmarks obscure — context management, loop reliability, and the gap between demo and production use.

Agentic coding loops are not just autocomplete at scale. The analysis at danluu.com catalogs where these systems actually fail when you let them run unsupervised across a real codebase.

The core problem is loop reliability. A single-step code suggestion failing is recoverable. An agent that silently goes wrong on step three of a twelve-step refactor, then compounds the error through subsequent steps, is a different category of problem. Most benchmarks measure task completion on clean, bounded problems. They do not measure whether the agent knows when to stop, when to ask, or when it has already gone off the rails.

Context management is a second pressure point. Long agentic runs push against context windows. Models lose track of constraints established early in a session. The result is not a hard failure — it is subtle drift that only becomes visible when the engineer reviews output at the end of the run. At that point, the cost of the mistake has already accumulated.

The appendix on writing the post itself is worth attention. Using an agentic loop to assist in producing technical writing reveals the same class of issues: the model confidently continues in the wrong direction rather than surfacing uncertainty. This is a signal problem. Agents optimized for output volume do not naturally produce calibrated stopping behavior.

For engineers adopting agentic tooling now, the practical read is this: invest in checkpointing and review gates rather than assuming the agent will self-correct. Treat long agentic runs the way you treat long database migrations — with explicit rollback plans and observable intermediate states.

The analysis does not prescribe specific tools. It describes the structural properties of the problem space, which makes it durable across whatever tool versions ship next quarter.