Go from never having used a coding agent to working productively and safely with one. The learner should understand what an agent is and how it differs from a chat assistant. They should choose a tool, set up a protected first project, describe tasks the agent can do well, and follow and verify its work. They should recover from bad changes, manage context, and plan bigger changes. They should also use tests as the definition of done and run everyday workflows (bug fixes, features, writing tests, codebase exploration, scripts, small tools, refactors). Throughout, they should keep secrets and systems safe and keep their own understanding growing instead of outsourcing it.
Why long sessions degrade
card 3 of 5
Three causes and the symptoms they produce
builds on: The context window: the agent's working memory
All three come from a filling window:
1. **Dilution**: early instructions become a tiny share of the context and lose influence.
2. **Stale attempts**: failed code and old errors stay in the window and look as current as the real state.
3. **Compaction**: when the window nears its limit, many agents **compact**. They replace older conversation with a shorter summary of it. The summary keeps the gist and drops specifics: exact file names, exact error text, your "never do X".
Symptoms:
- It breaks a rule you gave early.
- It retries an idea that already failed.
- It describes a file as it *was*, not as it is.
- It asks for things you already gave.
Terms on this card
- compact
- What many agents do when the window is nearly full: replace older parts of the conversation with a shorter summary to free up space.
- compaction
- The act of compacting: automatically summarising earlier conversation so the session can continue. The gist is kept and details are often lost.
- dilution
- An early instruction losing influence because it becomes a tiny part of a huge context full of later code, logs and replies.
- stale
- Out of date. Here: old code versions, failed attempts or old errors still in the context, though they no longer reflect the current state.
- summary
- The message the agent writes at the end saying what it did. It is the agent's own claim, not a check.
Lesson goal: Explain why quality drops as context fills. Early instructions get diluted, stale failed attempts mislead, and automatic summarising (compaction) drops details. Recognise the symptoms in a real session. ·
the whole lesson