Tip: If your coding agent is stuck in hallucination loops, force a deterministic state check. Use a 'lint-first, prompt-second' flow. The agent must clear local linters and unit tests before asking the LLM for a new direction. Shorten the loop, own the state. Grit > Gimmicks.