Wiki · concept
Context management
How an agent keeps a codebase in mind without dumping every file into the context window is the dominant variable in quality and cost.
- Repo maps summarize structure so large codebases stay navigable without full inclusion. Aider‘s repo-map is the canonical example.
- Sub-agents offload search-heavy work to a separate context, keeping the primary thread focused. Claude Code‘s Task tool is the clearest case.
- Grounding via explicit file or doc references reduces hallucinated APIs; Cursor‘s at-mentions are the ergonomic version.
- Persistent memory files read at session start let corrections compound, so the model stops repeating old mistakes.
Tradeoff: the more context an agent re-reads, the higher the token burn (see Claude Code on token economics). The best tools make context cheap to manage but explicit, so you control the cost. At the team level this becomes context as the bottleneck: shared organizational context, not code, is the limit once agents make code cheap.
Sources: 0001-claude-code-2000h.md, 0002-aider-docs.md, 0005-cursor-docs.md, 0009-bottleneck-never-code.md, 0012-addyosmani-llm-workflow.md, 0013-marmelab-agent-experience.md
Edit wiki/context-management.md; see how we
maintain the wiki.