Progressive Disclosure

The principle

Progressive disclosure is a simple rule for spending a context window: put a little in up front, and load the rest the moment a task actually needs it. The agent keeps a short summary of what is available and opens the full detail of any one piece only when it reaches for it. You will also see it called progressive context disclosure or just-in-time context.

Two ways to fill the same window. Front-loading keeps the context high the whole session; progressive disclosure starts small and steps up only as the task needs it. The gap between the lines is the surplus front-loading carries but never uses.

Real World Analogy

Think of a library card catalog. You don't haul every book to your desk to find the one you want. You scan a drawer of cards, each holding a title and a call number, and walk to the shelf to pull down the single book only when you need it. The catalog stays compact no matter how large the collection grows.

A library card catalog with one drawer open, each card showing a title and call number, and a single book pulled from a nearby shelf — the same trade-off as holding a compact index and opening full detail only when a task reaches for it.

Progressive disclosure is that catalog for a context window. The cards are the lightweight references the agent holds, a file path or a one-line description, and the book is the full detail it opens with a tool call when a task calls for it. Keep the catalog in hand, and the whole collection stays one trip to the shelf away.

Load context just in time

One way to set up an agent is to pour everything it might need into the prompt at startup: every doc, every tool, every instruction. That holds up on a small project. Once the project grows, the window fills with material the current task never touches, and the agent spends its attention reading past noise.

In its simplest form, progressive disclosure is just telling the agent when to read something. A pointer in your AGENTS.md like "read docs/deploy.md before deploying" keeps those steps out of the window until the moment they matter, then sends the agent straight to them. All the agent holds in the meantime is a lightweight reference, a file path, and it opens the file with a tool when the step calls for it. The same trick works for saved queries, links, or anything else the agent can fetch on its own (Anthropic).

That keeps the always-loaded file short: a handful of facts that hold every session, plus a map of what to read when. Everything else stays one tool call away.

Where else it shows up

The same move helps anywhere something competes for the window:

  • Agent Skills. Skills were built around progressive disclosure from the start. An idle skill costs almost nothing: only its one-line description sits in context, and the full instructions and bundled files load when a task actually calls for it.
  • Tool definitions. Every tool an MCP server exposes costs tokens, whether the agent calls it or not. Loading a server's tools only when they are needed took one browser-automation server from 26 tools and 17k tokens down to 4 tools and 1.5k (Amp).
  • Retrieval. Fetch a document when a query needs it, rather than pre-loading a whole knowledge base.
  • Memory. Keep a compact index of what the agent knows and expand only the branch a question touches.