01. Treating Context Windows as Working Memory
Long-running agent sessions rarely fail because a model lacks raw reasoning capacity. Most failures start when noisy command logs, stale file dumps, and redundant retries crowd out the actual task constraints.
Keeping working memory clean requires explicit boundaries between exploration and execution:
- Summarize large tool outputs immediately into structured facts rather than re-reading raw logs across turns.
- Store persistent state in plain Markdown or JSON ledgers on disk instead of relying on conversation history alone.
- Delegate wide codebase scans to isolated read-only workers so only distilled findings enter the main loop.