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.
Half-finished changes: the call sites it missed
card 4 of 6
Two files changed, tests green
builds on: What the agent cannot see
The tell: a public function is renamed *and* gets a new required parameter, yet the diff touches only the one caller the agent had open, and its transcript shows no search. Python checks nothing until a call runs. `worker.py` calls `getattr(notify, job["handler"])`, and `jobs.yaml` still says `handler: send_email`. **Later cost:** that lookup raises `AttributeError` only when the nightly job runs. Fix just the YAML and, if the worker passes only `(to, body)`, the call still fails with `TypeError` for the missing `channel`.
// Python
--- a/notify.py
+++ b/notify.py
-def send_email(to, body):
+def send_message(to, body, channel):
--- a/signup.py
+++ b/signup.py
- notify.send_email(u.email, msg)
+ notify.send_message(u.email, msg, "email")
Terms on this card
- tell
- An observable sign in a diff, transcript or summary that suggests a shortcut or an error.
- Later cost
- The concrete damage a shortcut does after merge, such as a hidden bug, corrupted data or extra maintenance.
- caller
- Any place in code that invokes a function or uses a name, sometimes called a call site.
- getattr
- Python built-in that looks up an attribute by a string name at runtime. It raises AttributeError if the name doesn't exist.
- AttributeError
- Python exception raised when code asks an object or module for an attribute it doesn't have.
Lesson goal: Recognise a rename, signature change or semantic change applied only in the files the agent read, while other callers, reflection or string references, configs, docs and other services still use the old form. Check for missed sites with search and the compiler. ·
the whole lesson