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.
Spot shortcut tells and name their later cost
card 1 of 6
Green in two minutes: what did it buy?
builds on: Making a failing test pass by weakening it, Hardcoding the answer the test expects, Silent fallbacks that hide bugs, Rust tells: unwrap, clone and RefCell to appease the compiler, Sleeps, retries and longer timeouts as 'fixes', Duplicating code instead of reusing it, Overbuilt code: speculative abstraction and defensive clutter, Placeholders passed off as implementations
You asked the agent to fix a flaky Go test in the sync worker. Two minutes later it reports: 'Fixed the flaky test, CI is green.' The diff touches the worker and its test. Nothing looks broken, and the summary sounds sure. What exactly should you look for, and what do you write in the review so the problem gets fixed instead of debated?
Terms on this card
- CI
- Continuous integration: a server that builds the code and runs the tests automatically on every push or pull request.
- flaky test
- A test that sometimes passes and sometimes fails on the same code, often because of timing or ordering.
- the agent
- The AI coding system doing the work: a chat assistant, IDE agent or terminal agent.
- diff
- The set of line changes between two versions of the code: removed lines start with '-', added lines with '+'.
- flaky
- Said of a test that sometimes passes and sometimes fails without any code change. Often used as an excuse to skip a test that is actually failing.
Lesson goal: Read agent code in any of the five languages and identify shortcuts: weakened tests, hardcoded answers, swallowed errors, silent fallbacks, type escapes, Rust unwraps and clones, timing band-aids, duplication, overbuilt code, placeholders and symptom patches. For each, state the concrete damage it will do after merge. ·
the whole lesson