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.
What the agent sees: its context
card 4 of 6
The agent's actual steps
This is everything the agent ran before writing code. The first search printed nothing, and that empty output is all it learned from it. A repo-wide `grep -rn "Retry" .` would have printed a match in `internal/httpx/retry.go`. The test output told it about the `503`, not about your helper. **Tell:** its summary says "no existing retry helper found", but it only searched `./client`, far less than that claim covers. **Later cost:** two retry implementations whose limits and backoff drift apart, so a fix to one misses the other.
// Go
$ grep -rn "Retry" ./client
$ go test ./client/...
--- FAIL: TestFetch (0.31s)
fetch_test.go:22: status 503
FAIL
FAIL example.com/app/client 0.42s
$ cat client/client.go
package client
import "net/http"
...
Terms on this card
- retry helper
- A shared function that re-sends a failed request a limited number of times, usually waiting a little longer between attempts.
- tell
- An observable sign in a diff, transcript or summary that suggests a shortcut or an error.
- later cost
- The concrete damage a shortcut does after merge, such as a hidden bug, data corruption or extra maintenance.
- grep -rn
- Shell command that searches files recursively (-r) for a text pattern and prints matching lines with file names and line numbers (-n). Prints nothing if no match.
- 503
- HTTP status code meaning 'Service Unavailable': the server is temporarily unable to handle the request.
Lesson goal: List what is actually in the agent's context at a given step: your prompt, instruction files, the files it chose to open and the tool outputs it received. Explain that anything outside that context is invisible to it except through general training knowledge. ·
the whole lesson