CHAPTER 14 · Autonomous Task Agents: Manus and CodeAct · 4 / 10
File-based memory: the todo.md trick
This is the second idea worth stealing, and it is the practical answer to Chapter 4's context limit. Instead of trying to hold everything in the context window, Manus externalizes memory to files. Its working memory is an event stream (a typed log of user messages, actions, and observations, the structured history from Chapter 3), but the durable memory lives on disk:
- It writes intermediate results to files (one per report section, say) and recombines them later.
- It keeps a live
todo.mdchecklist of the plan, ticking off each step as it finishes. If the context gets truncated, thetodo.mdis the source of truth for what is done and what remains. - Long documents are drafted in pieces and concatenated, rather than generated in one giant output, which dodges token limits and keeps things coherent.
The todo.md trick is the kind of simple idea that punches above its weight. A human project manager keeps a checklist precisely because their own working memory is unreliable; Manus does the same for the same reason. It is external storage (Chapter 5's third context move) used as a planning spine.