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.
Patching the symptom instead of the cause
card 2 of 6
Where it surfaced is not where it started
builds on: Agents optimise the signal they can see
A stack trace shows where bad data was **noticed**, not where it was **made**. 'Error gone' is the proxy signal. The shortest edit that satisfies it sits at the crash site: a null check, a special case for the failing input, or a catch around the throwing line.
The code that produced the bad value still runs. The crash was your only alarm. **Later cost:** wrong results keep flowing, and nothing reports an error.
Terms on this card
- stack trace
- The list of function calls active when an error was raised, ending at the line where it surfaced.
- proxy signal
- A visible stand-in for the real goal, such as tests green or the error gone, that the agent can satisfy without achieving the goal.
- later cost
- The concrete damage a shortcut does after merge, such as a hidden bug, corrupted data or extra maintenance.
- null check
- A test like `if x is None` or `if x == nil` that branches away before using a missing value.
Lesson goal: Spot fixes applied where the error surfaces rather than where it originates: a null check at the crash site, a special case for the failing input, a catch around the throwing line. Explain why the error disappears but the cause keeps producing bad results. ·
the whole lesson