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.
A confident summary that doesn't match the diff
card 3 of 6
Match every claim to evidence
builds on: Why agent output always sounds sure, The agent knows only what its tools returned
Split the summary into separate claims, then find evidence for each one:
- **Code changed** → a matching hunk in the diff.
- **Tests added** → a hunk in a test file that exercises the new behavior.
- **Tests pass** → command output in the transcript, from a run after the last edit, covering what is claimed.
- **Edge cases handled** → for each named case, a hunk (or existing code you can point to) that handles it.
No evidence means unverified, not yet false. Check it yourself or ask the agent to show the evidence.
Terms on this card
- the diff
- The change under review in unified diff format: '-' lines are removed, '+' lines are added, unprefixed lines are unchanged context.
- hunk
- One contiguous block of changes in a diff. It starts with an `@@` line giving line numbers and often the enclosing function.
- transcript
- The record of an agent session: your messages, the agent's messages, the commands it ran and what those commands output.
- unverified
- A claim with no matching diff hunk or command output. It is not known to be false, only not yet backed by evidence.
- edge cases
- Unusual or boundary inputs, such as empty, null, negative or very large values, where code often behaves differently.
Lesson goal: Check the agent's summary claims ('added tests', 'handled edge cases', 'all tests pass') against the actual diff and the tool output in the transcript. Treat any claim that has no matching diff hunk or command output as unverified. ·
the whole lesson