Work effectively with AI coding agents. Understand them as language models running in a tool loop with limited context, which is why they guess, game the visible signal and report confidently. Recognise the shortcut and correctness tells in their code across Python, TypeScript/JavaScript, Rust, Java and Go, and know the damage each one does later. Verify changes instead of trusting them, review diffs fast for quality and security, judge when work is truly finished, and choose, design and steer tasks so agents can finish them well.
When to stop, reset or take over
card 6 of 6
Stop early, restart clean
builds on: Long sessions: lost instructions and drift, Patching the symptom instead of the cause
These four tells mean the context is polluted, and more turns will make it worse:
- repeated fixes
- a growing diff
- piling suppressions
- self-contradiction
Revert to a clean commit. Then either restart with a short summary of goal, facts, dead ends and the done check, or write the fix yourself.
Terms on this card
- context
- Everything in the model's input for the current step: your messages, instruction files, files it has read and tool outputs.
- suppressions
- Markers that tell the compiler, type checker or linter to stop reporting a problem on some code, without fixing the problem.
- clean commit
- A commit from before the troubled session, where the code was in a known, understood state.
- diff
- The set of line changes between two versions of the code: removed lines start with '-', added lines with '+'.
- commit
- Making database writes permanent. Once committed, a write stays even if later steps fail.
Lesson goal: Recognise a session going bad: the agent repeats a failed fix, the diff keeps growing, suppressions pile up or it contradicts itself. Then revert to a clean commit, start a fresh session with a distilled summary, or do the change yourself. ·
the whole lesson