Todo-List-Driven Autonomous Agent
Have the autonomous agent author a writeable plan file (e.g. todo.md) early in the run, tick items as it completes them, and re-inject the remaining plan into the end of the context window; the file is the durable plan and the model's working memory.
Intent & Description
🎯 Intent
Have the autonomous agent author a writeable plan file (e.g. todo.md) early in the run, tick items as it completes them, and re-inject the remaining plan into the end of the context window; the file is the durable plan and the model’s working memory.
📋 Context
A team runs an agent on a long-horizon autonomous job — a multi-hour coding task, a deep research investigation, a complex data migration — inside a sandboxed virtual machine with persistent file-system access. The run may span hundreds of tool calls, more than any one model context window can comfortably hold. The team needs the agent’s plan to survive context truncation and process restarts.
💡 Solution
- Early in the run, the agent writes its plan as a checklist file (todo.md). - Each turn: read the file, work the next unticked item, update the file (tick the item, add follow-ups, drop dead-ends). - Re-inject the unticked tail of the file into the prompt before the model’s next turn. - The file outlives any single context window and survives pause/resume.
Real-world Use Case
- A long-horizon autonomous task may span hundreds of tool calls and exceed in-context plans.
- The sandbox provides filesystem access for a durable plan artefact.
- Runs may be paused, truncated, or resumed and need a reload-friendly plan.
Source
Advantages
- Plan survives context truncation and pause/resume cycles.
- Re-injecting unticked items keeps the model focused on what remains.
- Human-readable trail for debugging and review.
Disadvantages
- Re-injection costs tokens every turn.
- The agent may rewrite the file capriciously; needs guardrails on plan mutations.
- Sandboxed VM cost (one VM per task) is non-trivial.