Task Lists and Self-Planning: the Todo Tool, Progress Rendering, and Early Detection of Spinning
Give long tasks a dashboard: implement a tool that lets the model maintain its own todo list, render that list live in the terminal, use it to keep the model to one thing at a time, and use changes in the list to catch the model spinning in circles at the earliest moment.
Today's Goals
- Design a tool that lets the model maintain its own task state, and explain why it improves long-task performance
- Implement incremental rendering of the list in the terminal without stepping on streaming text
- Use changes in the list to recognize stalling and spinning, and give an intervention strategy
Yesterday gave it rules; today gives it a checklist. When you finish, scroll back up and tick the three goals off.
Plain-Language Walkthrough
The checklist pinned to the desk: how far along, at a glance
The new hire can work, knows which file to open, and knows the team rules. So you confidently hand them something larger: fix this failing test.
Forty minutes later you pass their desk and ask "how far along?" They look up and start recalling: I ran the tests, then looked at calc.js, then wanted to change it, but there seemed to be another problem in the tests, so I went to look at the test directory, and then...
The problem is not that they did no work; it is that they cannot answer "how far along" either. They have a plan in their head, that plan exists only in their head, and it shifts slightly with every file opened.
You have seen the fix in every workshop: pin the checklist to the desk. Three lines, a box in front of each, ticked as they are done. You know at a glance in passing; they look up and know what is next.
Today gives mca that board, with one counterintuitive property: we do not maintain it for the model, the model maintains it itself. We provide one tool (update_todos) and one hard rule; it writes and it ticks.
Why does it help? Because the model has no memory — day one said so: all it sees each turn is the text in the context. A "plan" in its head that never lands as text in the context does not exist next turn; and when it reads next turn the checklist it wrote last turn, "how far along am I" turns from a question requiring recall into a fact it can read.
That is today's core proposition: externalized state is steadier than an implicit plan.
Interview questions
What does letting the model maintain its own task list buy you over writing the plan in the prompt, and what does it cost?让模型自己维护任务清单,比在提示词里写计划好在哪?代价是什么?
Common in ChinaCommon overseasBasic#self-planning#tool-design🔒 Unlock this chapter to see the answer keys.
With streaming text and a fixed progress area in the same terminal, how do you manage the cursor and repaints?终端里同时有流式文本和固定的进度区域,你怎么管光标与刷新?
Common in ChinaCommon overseasIntermediate#terminal-rendering#cursor-control🔒 Unlock this chapter to see the answer keys.
How do you detect from runtime data that an agent is spinning in place, and what do you do once you detect it?怎么从运行数据里发现 Agent 已经在打转?发现之后怎么干预?
Common in ChinaCommon overseasDeep dive#stall-detection#agent-observability🔒 Unlock this chapter to see the answer keys.
