r/ClaudeAI • u/playnew • 5h ago
Workaround A small trick to guide an LLM Agent while it’s coding
I find it frustrating when an LLM agent writes incorrect code and I have to decide whether to interrupt it immediately or wait until it finishes everything.
When I interrupt it, the agent sometimes seems to lose its train of thought. But when I wait, it may continue building on the mistake, lose track of earlier instructions, or produce so many changes that reviewing everything at once becomes difficult.
A solution that has worked surprisingly well for me is to write a note directly into the code… not as a valid comment, but actually as plain text that intentionally breaks the syntax lol.
The agent eventually notices that the file no longer compiles or parses correctly, opens it, finds the exact line containing the note, and reads what needs to be changed.
This lets me guide the agent without interrupting its current execution. I can follow its progress and leave notes while it works, turning the process into a kind of live code review instead of waiting until the end to review a large batch of changes.


