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.
Fine on test data, broken at scale
card 2 of 6
Cost that only shows up with volume
builds on: What the agent cannot see
Production data and its volumes are not in the agent's context. It writes the most direct code that does the job, and its only feedback is a tiny fixture. At that size, one query per row, a full table load or a list scan per item all finish in a few milliseconds. Green tests are a proxy signal: they show correctness at n=3, not cost at n=1,000,000. **Later cost:** timeouts, memory kills and database load that grow with your data.
Terms on this card
- fixture
- Prepared test data loaded before a test runs.
- proxy signal
- A visible stand-in for the real goal (tests green, it compiles) that can be satisfied without achieving the goal.
- 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 does after merge, such as a hidden bug, data corruption or maintenance burden.
- the agent
- The AI coding system doing the work: a chat assistant, IDE agent or terminal agent.
Lesson goal: Recognise code that passes small tests but fails on production volumes: N+1 queries from ORM calls inside loops, unbounded queries with no pagination, reading whole files or tables into memory, quadratic list lookups in loops, and regexes prone to catastrophic backtracking. Explain why the agent cannot see this coming, and which check (query log, profile, large fixture) exposes it. ·
the whole lesson