§02 · Sessions, Context Windows & Turns

Context

Everything the agent currently has in front of it that bears on the task: loaded files, your messages, tool results so far.

Context is the information the agent is actually working from right now. Not what exists in your repo, not what the model absorbed in training, but the specific text that has been loaded into the current session: your instructions, the files it has read, the command output it has seen, the plan it wrote three turns ago. If a fact is not in the context, the agent is either guessing from parametric knowledge or inventing.

This is why two people can run the same prompt and get wildly different results. One pasted the failing test and the relevant module; the other typed 'fix the bug'. The model was identical; the context was not. Most 'the AI is dumb today' complaints turn out to be 'the agent never saw the thing I assumed it knew'.

Good context is relevant, current and small. Point the agent at the two files that matter instead of the whole directory; paste the actual error instead of describing it; drop stale plans once they are done. The container the context lives in is the context window, and it is finite, so every irrelevant line you load competes with the lines that matter. Managing this on purpose is the discipline of context engineering.

In the tools
  • Claude Code/context shows what is occupying the window; @file mentions load a file into context deliberately.
  • CursorThe @ menu attaches files, docs and web results to the request explicitly.
In conversation

It keeps proposing a fix for a function that doesn't exist anymore.

Check the context. It read that file before your refactor and hasn't looked since. Tell it to re-read the module.

Related terms
Learn it in the school
Words are the easy part

Course 01 puts every one of these terms to work: you install Claude Code, run the loop, and ship a real project — permission modes, compaction, hooks and all.

Start Course 01 →