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 2 of 6
A gap doesn't feel like a gap
builds on: What the agent cannot see, Why agent output always sounds sure
The model writes the most likely continuation of its context. Files it never opened don't exist for it. Yet there is always a likely next line: what thousands of public projects do. A missing fact doesn't register as missing, so asking rarely beats writing code. The guess sounds as sure as a fact, and it fits *typical* code, not *your* helpers, conventions and constraints. Later cost: code that silently skips what your helpers enforce, such as auth, timeouts and retries.
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.
- Later cost
- The concrete damage a shortcut does after merge, such as a hidden bug, corrupted data or extra maintenance.
- auth
- Short for authentication/authorisation: checking who is calling and what they may do.
- model
- The AI language model at the core of a chat assistant or agent: it takes text in and produces text out.
- conventions
- The established ways a codebase does things: which helpers it uses, how it names things, how it handles errors, how it formats code.
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