Mistakes Coding Agents Make Frequently

December 21, 2025

React useEffect

Coding agents overuse useEffect because they treat React components like procedural scripts rather than declarative state machines. When an agent sees a requirement like "update X when Y changes," useEffect offers the most literal syntactic translation of that imperative instruction (Trigger -> Action). Agents struggle with the subtler, "React way" of thinking—calculating values during the render pass or handling logic inside event handlers—because those methods require understanding the holistic data flow of the application, whereas useEffect acts as a brute-force patch that can be blindly pasted in to "force" a synchronization without refactoring existing logic.

TypeScript as any forced assertions

Coding agents frequently abuse as any—a forced type assertion that instructs the compiler to completely disable type-checking for a specific variable—because they prioritize silencing the error over strictly adhering to the data contract. When an agent encounters a type mismatch, the "correct" fix often requires tracing the data back to its source or adjusting shared interfaces, tasks that demand a high-level understanding of the project's architecture. Lacking this broader context, the agent treats the error as a mere roadblock to be bypassed; it uses as any to force the code to compile, effectively trading a visible build error for a hidden runtime risk.

--

I intend to maintain this blog posts as I encounter more of these.

Comments 0

No comments yet. Be the first to comment!