The AI Coding Agent Guide: Context, Workflows, and Verification
Quick answer: An AI coding agent is only as good as the context it is given and the verification it is held to. The two failures that dominate real work
Read articleTopic
Quick answer: An AI coding agent is only as good as the context it is given and the verification it is held to. The two failures that dominate real work
Read articleThe agent needed to raise the request timeout, so it appended a second timeout block to the config instead of editing the existing one. The lenient parser silently kept the last occurrence, and the first tuned value vanished without an error.
Read articleThe agent added a guard to reject negative quantity, but placed it after the order was already saved. The standalone guard test went green while invalid rows kept landing in the table. A check that runs after the side effect protects nobody.
Read articleTwo routes shared an upstream call, so the agent lifted the block into one helper. The callers differed only on fault: one rethrew for a 500, the other served a cached fallback. The helper picked one exit, the harder caller silently degraded, and green tests missed it.
Read articleThe agent lowercased an opaque external id to fix inconsistent lookups, normalizing on write and read. New rows matched, existing mixed-case rows went missing and fell back to a default nobody noticed. Covers when normalization corrupts stored data and how to keep the canonical token intact.
Read articleThe agent implemented the happy path, returned 200, and declared done. The failure branch emitted nothing: no log, no trace, no surfaced error, so when it fired in production on-call had nothing to grep for. Covers a structured breadcrumb on every exit branch and verifying it under fault.
Read articleA tool call returned truncated JSON on timeout. The agent treated the partial chunk as live data and completed the missing fields by guess, so invented values blended into the plan. Covers why a model should never finish a partial record, and the raw-output checkpoint that stops it.
Read articleThe agent fixed the real bug, tests went green, and merged — but the scratch console.log stayed behind. A logging call has no assertion target, so green proves control flow, not that diagnostics were removed. Covers noise versus the secret-leak tier and the checks that catch leftover prints.
Read articleThe agent pasted the top-voted Q&A answer to silence a deprecation, tests passed, and the call silently no-op'd on the installed major. Votes reward past usefulness, not a match to your pinned version today. Compare its era to the lockfile, grep for the symbol, assert the observable result.
Read articleThe agent sorted the webhook body's JSON keys alphabetically after signing. Shape-only tests passed, CI went green, but production returned 401 signature_invalid: the receiver rehashed the reordered bytes and got a different digest. Order is cosmetic to a parser; bytes are everything to a signature.
Read articleThe agent fetched a client-credentials token once at startup, cached it for the process lifetime, and never modeled expiry. Stubbed tests passed, the deploy was clean, and an hour later calls returned 401 until a restart. A short-lived token was treated as a static key.
Read articleKeyword search returned the normalize family, the agent picked the first match, refactored normalizeEmail, wrote its own green tests, and left the failing normalizePhone path untouched. Pin the traceback symbol, run the original repro before and after, and check callers against the failing request.
Read article