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.
Review an agent diff fast and well
card 1 of 6
Ten minutes, 240 lines, one-line bug
builds on: Triage a diff: where to look first, A confident summary that doesn't match the diff, Verify by running, not by reading claims
You asked the agent to fix an off-by-one in `page()`: the last page comes back empty. It replies: *Fixed pagination, added tests, all tests pass.* The diff touches 9 files and about 240 lines. You have ten minutes. If you read it top to bottom, you spend them on easy hunks. Where should the ten minutes go, and what do you decide at the end?
Terms on this card
- off-by-one
- A bug where a count, index or boundary is wrong by exactly one, such as starting a page one page too late.
- diff
- The change under review in unified diff format: '-' lines are removed, '+' lines are added, unprefixed lines are unchanged context.
- the agent
- The AI coding system doing the work: a chat assistant, IDE agent or terminal agent.
- pagination
- Splitting a long list into numbered pages of fixed size, returning one page per request.
- pass
- Python statement that does nothing; used as a body, it makes a function or handler an empty shell.
Lesson goal: Review an agent diff in minutes. Triage by risk, read the test changes first, separate unrelated changes, reconcile the summary with the diff and run the decisive check yourself. End with a clear accept, change or reject decision and the reasons for it. ·
the whole lesson