Because a model learns nothing from your conversation, context is everything. It is the complete bundle of text handed to the model on a given request, and it is the model's entire view of your task. If a fact is not in the context, the model does not know it, no matter how obvious it seems to you.
What goes into it
For a coding agent, the context on any request is typically assembled from:
- The system prompt and the tool definitions.
- Your instructions and any project rules the agent loads.
- The back-and-forth of the current conversation.
- File contents, command output, and search results the agent has gathered.
All of that competes for the same fixed space, the context window, and it is all measured in tokens.
Context is the lever you pull
Almost everything you do to get better results from an agent is a form of context management. Pointing it at the right files, clearing out finished work, stating a constraint plainly, giving it an example: these are all ways of shaping what the model sees. When an agent gets something wrong, the first question is rarely "is the model bad" and almost always "did it have the right context."
Related terms
Context window
The context window is the maximum amount of text, measured in tokens, that a model can consider for a single request. It is a hard ceiling, and it is the main resource you manage when working with an agent.
Read definition →System prompt
The system prompt is the standing instruction placed at the very start of the context that sets the model’s role, rules, and tone before the conversation begins. It shapes every reply without being part of the back-and-forth.
Read definition →Token
A token is the unit of text a model reads and writes: a chunk that is usually part of a word, not a whole word or a single character. Everything is measured in tokens, including your context window and your bill.
Read definition →