A simple way to stop costly AI coding loops
can waste tokens and time when they repeat the same mistake in slightly different ways. The may be unclear instructions rather than the model itself. Broad requests such as “add user ” or “fix the login redirect” leave too many choices open.
The AI then picks defaults, and the person rejects those choices because they do not match an unclear expectation. A practical fix is to write a short note before opening the IDE. The note should say what the feature does, what it must not do, and what apply.
The “must not do” line is especially useful because it forces into the open before the AI starts coding. Even 4 or 5 rough lines in a scratch file can reduce the apologize-and-repeat loop.
Key points
- Vague requests make the AI choose defaults on its own.
- Repeated correction loops burn tokens without producing useful progress.
- A 4 or 5 line scratch note can clarify the task before coding begins.
- Writing what the feature must not do helps uncover early.
- can include rules such as no new or using the existing session library.