10 Summary
Context engineering is the discipline of managing the scarcest resource in AI systems: the context window. This book has established that:
- Tokens are the currency — everything has a cost measured in tokens (Chapter 1)
- Context windows are smaller than advertised — design for the smart zone, not the marketing number (Chapter 2)
- The messages array has a fixed-cost structure — system prompt, harness, project context, and tools consume tokens before your conversation even begins (Chapter 3)
- Tool calls are memory allocations — they grow context permanently within a session (Chapter 4)
- Sub-agents are context isolators — delegate reads to sub-agents, keep writes centralized (Chapter 5)
- Message passing is the architecture — design explicit protocols between context windows (Chapter 6)
- Fresh context beats stale context — the Ralph Wiggum Loop (Requirements → Planning → Building) uses the filesystem as memory and the context window as disposable compute (Chapter 7)
- Prevention beats compaction — avoid filling context rather than trying to compress it after the fact (Chapter 8)
The central insight: treat the context window as you would treat memory in a systems programming language — as a finite, precious resource that requires deliberate management.