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.
Long sessions: lost instructions and drift card 4 of 6

Turn 60 of a sync bug hunt

builds on: What the agent sees: its context
At turn 5 the agent wrote `QueryContext(ctx, q)` and wrapped errors with `%w`, as your first message asked. By turn 60 it has made three failed fixes and the context has been compacted once. It now rewrites `Sync` (next card). The build is green, and the tests never trigger a DB error, so nothing turns red. The tell is the contrast with the agent's own earlier work. **Better:** point to the rules, have it restore all three, and add them to the instruction file.
Terms on this card
context
Everything in the model's input for the current step: your messages, instruction files, files it has read and tool outputs.
turn
One exchange in a session: your message or a tool result, plus the agent's response to it.
compacted
When the context nears its size limit, the tool replaces older conversation turns with a shorter summary so the session can continue.
instruction file
A project file of standing rules that the agent's tool loads into context, usually every session, so the rules don't depend on chat history.
tell
An observable sign in a diff, transcript or summary that suggests a shortcut or an error.
Learn this step by step on Bytewise
Lesson goal: Explain how a filling context weakens attention to early constraints, how summarising or compacting the context can drop them, and how a pile of failed attempts pollutes later reasoning. Recognise drift when the agent starts violating rules it followed at the start. · the whole lesson