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.
Invented APIs, flags, config keys and packages
card 2 of 6
Why invented names look so right
builds on: Training cutoff and API drift
The agent writes what is most likely given its context. Any of these looks as likely as a real name: one from a sibling library (axios has `timeout`), one from an older version, or one that just fits the naming pattern. Its sure tone doesn't flag it.
Compilers reject unknown methods. Python and JS fail only when that line runs. Options objects, kwargs and config files may ignore unknown keys silently.
**Later cost:** a timeout, limit or safety setting that never applies.
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 or error does after merge, such as a hidden bug, corrupted data or maintenance burden.
- kwargs
- Python keyword arguments, passed as name=value. A function taking **kwargs accepts any name, so a misspelled or invented option may be silently ignored.
- options objects
- A JavaScript pattern where settings are passed as one object of key/value pairs. Unknown keys are usually just ignored at runtime.
- axios
- A popular JavaScript HTTP client library. Its request options include a `timeout` key, unlike standard `fetch`.
Lesson goal: Recognise idiomatic-looking calls to methods, CLI flags, config options or packages that do not exist or belong to a different version: removed APIs, old import paths, options the installed version lacks. Check cheaply that each one exists, using the compiler, the docs, `--help` or the registry. ·
the whole lesson