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.
The context window: the agent's working memory
card 2 of 5
One desk, and everything goes on it
builds on: Tokens: how models measure text, What the agent can and cannot see
Each session has one working memory, the **context window**: a fixed number of tokens. Everything goes into it: the tool's built-in instructions, any instruction file, your messages, the agent's own replies, every file it read and every line of command output. There is no separate notebook. At each step the model rereads all of it, so anything that gets pushed out stops shaping what it does.
Terms on this card
- context window
- The fixed number of tokens a model can hold at once. It is everything the agent can consider in a session.
- session
- One continuous conversation with the agent, from when you start it until you close or restart it.
- instruction file
- A project file, such as CLAUDE.md or AGENTS.md, that the agent reads automatically at the start of a session.
- command output
- The text a command prints when it runs, such as results, progress messages or errors. Anything the agent runs adds its output to the context.
- model
- The AI that reads text and writes text. In an agent, it decides what to do next.
Lesson goal: Explain that everything in a session (instructions, messages, files read, command output) shares a fixed token budget. Predict what fills it fastest: large files, long logs and long sessions. ·
the whole lesson