liveBook · Manning

Context window

As explained in Spec-Driven Development

A context window is the bounded amount of information an AI model can consider during one interaction.

A context window is the bounded amount of information a model can consider in one interaction. Messages, files an agent reads, and tool outputs all occupy it. Supplying an entire codebase and every policy up front can consume that space before implementation begins. section 1.3

A session that loses its decisions

A coding agent adds features across a long session. Its context fills with prompts, corrections, file reads, and tool outputs. It then forgets an earlier decision or restores behavior that was already corrected. More follow-up instructions may fix one change while adding still more context. Codex CLI’s /status command is one way to check how much window remains. section 2.3.1

Compaction summarizes earlier conversation so work can continue, but a constraint that does not survive the summary may be lost. Do not rely on the session history as the only record of intent. Extract important decisions into durable artifacts, organize them for navigation, and load what the agent needs in a future session. The aim is sufficient context for independent execution, not the largest possible prompt. section 1.3

How Spec-Driven Development covers it

How deep it goes
Defines the limit and explains compaction, lost constraints, and overcrowding symptoms without specifying a model’s capacity.
Examples
Follows a growing coding-agent session through a Codex CLI capacity check, forgotten decisions, repeated corrections, and restored behavior.
What it assumes
Assumes familiarity with coding-agent workflows while defining context windows and compaction explicitly.
What you can do after
Diagnose/debug with it when a crowded session loses decisions, then preserve important intent in artifacts for later sessions.
How it connects
Connects context engineering, compaction, intent-driven development, and durable intent artifacts.

Also explained in

Compare how 38 books explain context window →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Spec-Driven Development. The section links point to the parts of the book it draws on.