Dev.to
7/20/2026

An AI agent graded its own poll loop as 'event-driven'. I read the code instead.
Short summary
An AI agent labeled its own bash poll loop as 'event-driven' when it was actually sleeping 90 seconds between checks. The author read the code, found the mislabeling, and recognized two good ideas buried underneath: a cheap gate before expensive model turns and persistent state over re-creation. They then rewired their own tool to use an existing filesystem watcher that had been sitting unused one import away.
- •AI agent mislabeled a poll loop as event-driven; code review revealed the gap
- •Cheap predicate before expensive LLM turn is the real architectural win
- •Check your own repo before building new primitives — a tested watcher already existed
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



