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.
Catch plausible-but-wrong code card 2 of 6

Why plausible code hides these bugs

builds on: Happy-path code: the edge cases it skipped, Text, time and money: classic data traps, Fine on test data, broken at scale, Unawaited async work and floating promises, Leaked resources: files, connections, goroutines, Races introduced by plausible concurrent code, Retrying operations that aren't idempotent, Half-finished changes: the call sites it missed, Refactors that quietly change behavior, Invented APIs, flags, config keys and packages
The agent writes the most likely code for its context, and likely code fits the common case. That means small inputs, ASCII text, one caller, one thread, replies that always arrive, and the API version it remembers. Its tests come from the same guesses, so they share the same blind spots. Green only proves the cases it imagined. **Later cost:** the bug ships and shows up under real data, load or timing, far from the change.
Terms on this card
ASCII
A basic 128-character text encoding covering English letters, digits and common symbols, but no accents, other scripts or emoji.
API
Application programming interface: the functions, endpoints and options a library or service exposes to code that uses it.
context
Everything in the model's input for the current step: your messages, instruction files, files it has read and tool outputs.
caller
Any place in code that invokes a function or uses a name, sometimes called a call site.
Learn this step by step on Bytewise
Lesson goal: Find bugs in code that compiles, reads well and passes its tests: skipped edge cases, text, time and money traps, scale problems, unawaited async work, leaked resources, races, unsafe retries, missed call sites, behaviour-changing refactors and invented APIs. Choose the check that would expose each one. · the whole lesson