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.
Training cutoff and API drift
card 3 of 6
When it bites, and how to counter it
builds on: Why agents fill gaps with plausible guesses
**High risk:** a major version released near or after the cutoff; fast-moving ecosystems (frontend frameworks, pre-1.0 Rust crates); renames where the old name still runs but is deprecated.
**Tells:** deprecation warnings, old import paths, two API styles in one file, the agent pinning an older version to make the build pass.
**Counter:** state the versions in the task or instruction file. Point the agent at the lockfile and at the installed docs, type definitions or source.
Terms on this card
- lockfile
- A generated file (poetry.lock, package-lock.json, Cargo.lock) recording the exact dependency versions your project installs. In Go, go.mod fixes the versions and go.sum stores their checksums.
- major version
- The first number in a version like 2.7.1. A change in it signals breaking API changes.
- instruction file
- A file of standing project instructions that the agent loads into its context at the start of each session.
- type definitions
- Files describing a library's exported names and signatures, e.g. .d.ts files in TypeScript packages. They show the installed version's real API.
- pre-1.0 Rust crates
- Rust libraries whose version starts with 0. By convention they may break their API in any minor release.
Lesson goal: Explain that a model's library knowledge is frozen at training time and blended across versions. It therefore defaults to whatever was most common in its training data, not to the version in your lockfile. Predict when this will bite (fast-moving libraries, recent major versions) and how to counter it: state the versions, and point the agent at the installed docs, type definitions or the lockfile. ·
the whole lesson