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.
When to stop, reset or take over card 1 of 6

Third try, same fix, bigger diff

builds on: Long sessions: lost instructions and drift, Patching the symptom instead of the cause
You asked the agent to make the report build pass after a type error in `src/report.ts`. Forty minutes later it has tried converting the date three times in different words. The diff touches seven files. Its latest message says `r.date` is a string, two turns after it said it was a number. The build is still red. Your fingers are on 'try again'. Is that the right move?
Terms on this card
the diff
The change under review in unified format: '-' lines removed, '+' lines added, unprefixed lines are context, with a header naming the file.
red
A test or check that is failing.
type error
An error reported by a type checker or compiler when a value's type doesn't match what the code requires.
the agent
The AI coding system doing the work: a chat assistant, IDE agent or terminal agent.
diff
The set of line changes between two versions of the code: removed lines start with '-', added lines with '+'.
Learn this step by step on Bytewise
Lesson goal: Recognise a session going bad: the agent repeats a failed fix, the diff keeps growing, suppressions pile up or it contradicts itself. Then revert to a clean commit, start a fresh session with a distilled summary, or do the change yourself. · the whole lesson