Module 1 · What agents are · Lesson 3
Context engineering
What an agent actually sees on each turn, why more context can make it worse, and how to manage long documents such as contracts, reports and forms.
By the end of this lesson you can
- List everything that occupies an agent's context window and estimate a token budget for a real contract pack
- Explain context rot and the lost-in-the-middle effect, and what they imply for long documents
- Write a system prompt at the right altitude, and decide what belongs in CLAUDE.md, a skill or a subagent
- Choose between pre-loading documents and just-in-time retrieval, and explain how compaction and note-taking keep long tasks on track