What is a Context Window?
A context window is the maximum amount of text — measured in tokens — that a language model can consider at once when generating a response, encompassing the prompt, conversation history, and any retrieved documents together.
Everything the model "sees" at generation time — system instructions, prior turns of a conversation, file contents, tool outputs — has to fit inside this window; anything beyond it is simply not visible to the model for that response. Larger context windows let an agent reason over an entire codebase, a long document, or dozens of prior conversation turns without needing to summarize or discard earlier information, but they also cost more per call and can slow down response time as more tokens need to be processed.
Managing a context window well means being deliberate about what enters it: irrelevant tool output, verbose logs, or repeated boilerplate crowd out the information that actually matters, sometimes causing the model to lose track of an instruction given many turns earlier. Techniques like summarizing older turns, retrieving only relevant document chunks instead of whole files, and truncating noisy tool output are all ways of managing a limited window deliberately rather than just letting it fill up.
Models can also behave inconsistently well across a full window — performance on information placed in the middle of a very long context is sometimes measurably worse than information near the start or end, a known effect worth designing around for anything context-heavy.
In practice with Neotask
A Neotask coding agent working across a large repository doesn't load every file into context at once — it searches for the relevant files first and reads only what's needed, keeping the window focused on the actual task rather than diluted with unrelated code, which is also why forking a sub-task to a fresh agent context is useful when a parent conversation's history isn't needed for the next step.
Related terms
- closed-model
- coding-agent
- custom-ai-agent
- command-queue
Plans
Free
$0/mo
Download without a card and start for free.
Individual
$50/mo
The full personal agent platform for one person.
Business
$100/mo
One company workspace with room to add your team.
Enterprise
$200/mo
Multiple workspaces and capacity for larger teams.
Continue