Progressive Discovery vs Monolithic Context Strategy
The two ends
| Monolithic context | Progressive discovery (just in time) | |
|---|---|---|
| Idea | Put everything relevant in the prompt | Load a small index; fetch details on demand |
| Pros | Simple; no retrieval misses; stable prefix caches well | Small active context; scales; less context rot; lower cost per turn |
| Cons | Context rot; cost; size limits; slow | More turns and tools; the model may not fetch what it needs; needs good indexes |
Progressive discovery in Claude (verified examples)
- Skills: descriptions always in context so Claude knows what exists; the full body loads only when invoked; supporting files load when referenced; keep
SKILL.mdunder about 500 lines (../../../CCAR-F-Claude-Certified-Architect-Foundations/knowledge/03-claude-code-configuration-and-workflows/02-slash-commands-and-skills.md). - Tool search: tools are discovered and loaded on demand (
defer_loading) (D3.5). - Path-scoped rules load only when matching files are touched; subdirectory
CLAUDE.mdloads when Claude works there (../../../CCAR-F-Claude-Certified-Architect-Foundations/knowledge/03-claude-code-configuration-and-workflows/03-path-specific-rules.md). - Memory tool: record what is learned and read it back on demand; this is just-in-time retrieval.
- Subagents: explore in their own context and return a summary.
- Anthropic describes on-demand loading, including tool search, as an instance of just-in-time retrieval from its context engineering guidance.
Choosing (design guidance)
| Condition | Choice |
|---|---|
| Small, stable reference that every request needs | Monolithic, cached |
| Large or growing knowledge base; most requests need a fraction | Progressive discovery |
| Reference needed in full for correctness (a contract) | Include in full; do not rely on retrieval |
| Cost or latency sensitive at scale | Progressive, with a cached stable core |
| Reliability of fetching is low (poor index, vague descriptions) | Improve indexes first or go monolithic |
A common design: a monolithic stable core (policy, schema) in the cached prefix plus progressive discovery for the long tail.
Making progressive discovery work
- Write descriptions that tell the model when to fetch (the skill or tool description is the trigger).
- Provide a map (an index file, a directory listing) so the model knows what exists.
- Measure miss rate: cases where the needed item existed but was not loaded.
- Keep fetches cheap and small (return summaries first, details on request).
Exam traps
- Progressive loading with vague descriptions, so nothing is fetched.
- Monolithic prompts for ever-growing knowledge.
- Hiding must-have facts behind retrieval.
- No index or map.
- Ignoring extra turns (latency and cost) from on-demand fetching.
References
- Skills — checked Oct 16, 2026
- Tool search tool — checked Oct 16, 2026
- How Claude remembers your project — checked Oct 16, 2026
- Memory tool — checked Oct 16, 2026
Check your understanding
Why do skills load descriptions always but bodies on demand?Show answerHide answer
Answer
So the model knows what exists without paying the context cost of every body.Content required in full for correctness (a contract): progressive or monolithic?Show answerHide answer
Answer
Monolithic (include it in full).Best-practice hybrid?Show answerHide answer
Answer
Cached monolithic core plus progressive discovery for the long tail.