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.
Happy-path code: the edge cases it skipped card 2 of 6

Why agent code only covers the happy path

builds on: Why agents fill gaps with plausible guesses
The agent writes the most typical continuation. Typical public code handles the typical input: a non-empty list, every field present, numbers in a normal range. Its own checks reuse that same kind of input. So a green run is a **proxy signal**: it shows the common case works and says nothing about the edges. **Later cost:** a crash or a silently wrong result the first time real data hits an edge, often far from this code.
Terms on this card
happy path
The ordinary case where input is typical and everything goes as expected; code tested only here can fail on unusual inputs.
edges
Unusual but valid inputs at the limits of what code accepts: empty, missing, zero or negative values, and first/last positions in a range.
proxy signal
A visible stand-in for the real goal (tests green, it compiles) that can be satisfied without the goal being met.
Later cost
The concrete damage a shortcut does after merge, such as a hidden bug, corrupted data or extra maintenance.
green
A test or check that is passing.
Learn this step by step on Bytewise
Lesson goal: Probe agent code for the structural inputs it typically ignores: empty collections, None/null/nil and missing keys, zero and negative values, and off-by-one boundaries on ranges, slices and pagination. Predict which of these a given function will mishandle, and write the one test that would show it. · the whole lesson