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 6 of 6

Long sessions drift

builds on: What the agent sees: its context
As a session grows, early rules get diluted, compaction can drop them, and failed attempts steer later reasoning. When the agent breaks a rule it obeyed at the start, re-check everything since then. Restate the rule somewhere it persists, and consider a fresh session with a short brief.
Terms on this card
Compaction
The process of shrinking a full context by summarising older turns. Details the summary leaves out are gone for the agent.
the agent
The AI coding system doing the work: a chat assistant, IDE agent or terminal agent.
drift
The agent gradually breaking rules it followed early in a session, because those rules got weaker attention or were lost as context filled.
fresh session
A new agent conversation that starts with an empty context, carrying none of the old session's attempts.
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