---
title: "Context window"
url: https://www.daytona.com/definitions/c/context-window
---

# Context window

A context window is the largest amount of text, measured in tokens, that a language model can take in and produce in one call.

A context window is the limit on how much a language model can process at once. It is measured in tokens, the small pieces of text that a model reads and writes. The input and the output of one call must fit inside it together. Anything outside the window does not exist for the model during that call.

Context windows have grown from a few thousand tokens in early models to hundreds of thousands or more. A larger window lets a model read long documents, large parts of a code base, or long conversations. It also costs more, because the price and the time of a call grow with the number of tokens. Models also tend to use information less reliably when it sits in the middle of a very long context.

Agents fill their context window quickly, because every tool call and its result adds to the history. The harness must decide what to keep, what to summarize, and what to drop. Agents that work in a sandbox can keep large outputs in files there and read back only the parts they need. This keeps the window small while the full data stays available.

## Related terms

- [Context](https://www.daytona.com/definitions/c/context.md)
- [Token](https://www.daytona.com/definitions/t/token.md)
- [Context engineering](https://www.daytona.com/definitions/c/context-engineering.md)
- [LLM (Large Language Model)](https://www.daytona.com/definitions/l/llm-large-language-model.md)
- [Agent memory](https://www.daytona.com/definitions/a/agent-memory.md)
- [Agent harness](https://www.daytona.com/definitions/a/agent-harness.md)
