Free resources · For developers
Context engineering for long-running agents
Structured note-taking and compaction: keeping an agent useful in a multi-decade codebase.
The problem
A long task fills the agent's context. Old detail crowds out what matters now.
Four tools
- Structured note-taking: the agent writes notes outside its context and reads them back later.
- Compaction: summarize a long conversation and continue from the summary.
- Sub-agents: give a focused task a fresh context and take back a short result.
- Just-in-time retrieval: load files when they are needed, not up front.
A working pattern
Keep one status file, edited in place, that says what is active. Keep an index that says when to read each other file.
