Context Window Management
One of the most practical agent skills is keeping the active context small enough that the model does not get noisy or forgetful.
What Fills Context Fast
Section titled “What Fills Context Fast”- reading entire directories when only one file matters
- pasting long logs instead of the relevant error slice
- keeping a debugging session alive long after the task changed
- loading tools or MCP servers that are irrelevant to the current work
Fast Tactics
Section titled “Fast Tactics”| Problem | Better move |
|---|---|
| Large repo exploration | name the exact files or folders first |
| Noisy test output | capture only the failing lines or summary |
| Mixed tasks in one thread | start a fresh session for the new goal |
| Research plus implementation | isolate research in a subagent |
What To Keep Out Of Context
Section titled “What To Keep Out Of Context”- generated files
- lockfiles unless the task is dependency-related
- raw screenshots when a short description will do
- full build output when only one error matters
- old prompt history that no longer affects the task
Good Default Prompt
Section titled “Good Default Prompt”Read only these files first:- src/auth/middleware.ts- src/routes/admin.ts
Summarize what matters, then propose the smallest fix.Practical Rule
Section titled “Practical Rule”More context is not automatically better. Curated context usually beats maximal context.