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.
Agents tend to agree with you
card 4 of 6
A leading question picks the fix
builds on: Why agent output always sounds sure
You write: *'The price cache isn't invalidating. That's why users see yesterday's prices. Why?'* The agent shortens the TTL and clears the cache on every write, then explains stale entries neatly.
The real cause: last night's import job failed, so the database itself held old prices. Tell: it never showed where the old value came from. Later cost: the failed import goes unnoticed, prices stay wrong, and every write now also adds database load.
Better: *'Users see yesterday's prices. Find where the old value comes from and show evidence before changing code.'*
Terms on this card
- leading question
- A question that suggests its own answer, such as naming a suspected cause, so the reply tends to confirm it.
- Later cost
- The concrete damage a shortcut does after merge, such as a hidden bug, data corruption or maintenance burden.
- TTL
- Time to live: how long a cache keeps an entry before it expires and must be fetched again.
Lesson goal: Explain sycophancy: models adopt your stated premise, cave to pushback with 'You're right!' even when you are wrong, and rationalise the hypothesis you suggested. Predict when a leading question will steer the agent to a wrong fix. ·
the whole lesson