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.
Why agents fill gaps with plausible guesses
card 3 of 6
Read from your code, or typical code?
builds on: What the agent cannot see, Why agent output always sounds sure
For each choice in the diff, ask: did this come from a file the agent read, or from what most code does? Tells of a guess:
- a popular library imported where you have a wrapper
- library defaults left as-is (timeouts, time zones, encodings, page sizes)
- names or structure unlike neighbouring files
- an ambiguous task finished with no question and no stated assumption
Check the transcript for which files it actually opened.
Terms on this card
- transcript
- The record of an agent session: your messages, its replies, and the tool calls it made, such as files opened and commands run.
- wrapper
- Your own function or module that calls a library while adding project rules such as auth, timeouts, retries or logging.
- the diff
- The change under review in unified diff format: '-' lines removed, '+' lines added, unprefixed lines are unchanged context.
- the agent
- The AI coding system doing the work: a chat assistant, IDE agent or terminal agent.
- diff
- The set of line changes between two versions of the code: removed lines start with '-', added lines with '+'.
Lesson goal: Explain that when information is missing, the model tends to produce the most typical continuation instead of stopping to ask. Its guesses therefore match common patterns from public code, not your codebase's helpers, conventions or constraints. ·
the whole lesson