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 1 of 6
Tidy code that ignored your helpers
builds on: What the agent cannot see, Why agent output always sounds sure
You asked the agent for a function that fetches exchange rates. A minute later: tidy, idiomatic Python, tests green. But your project already has `api_client` (auth, timeouts, retries) and `now_utc()`. The agent used `requests` and `datetime.now()` instead. It never asked whether such helpers existed and flagged nothing. Why does it fill the gap instead of stopping?
Terms on this card
- green
- A test or check passing; 'red' means failing.
- idiomatic
- Written the way experienced users of a language typically write it.
- auth
- Short for authentication/authorisation: checking who is calling and what they may do.
- the agent
- The AI coding system doing the work: a chat assistant, IDE agent or terminal agent.
- tests green
- All tests pass.
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