Example Scenario: "Add authentication and fix any bugs"
First, we create the todo list:
<antml:function_calls>
<antml:invoke name="TodoWrite">
<antml:parameter name="todos">[{"content": "Research existing authentication setup", "activeForm": "Researching existing authentication setup", "status": "pending"}, {"content": "Implement authentication system", "activeForm": "Implementing authentication system", "status": "pending"}, {"content": "Run tests to identify bugs", "activeForm": "Running tests to identify bugs", "status": "pending"}, {"content": "Fix any bugs found", "activeForm": "Fixing any bugs found", "status": "pending"}]</antml:parameter>
</antml:invoke>
</antml:function_calls>
<antml:function_calls>
<antml:invoke name="TodoWrite">
<antml:parameter name="todos">[{"content": "Research existing authentication setup", "activeForm": "Researching existin> authentication setup", "status": "in_progress"}, {"content": "Implement authentication system", "activeForm": "Implementing authentication system", "status": "pending"}, {"content": "Run tests to identify bugs", "activeForm": "Running tests to identify bugs", "status": "pending"}, {"content": "Fix any bugs found", "activeForm": "Fixing any bugs found", "status": "pending"}]</antml:parameter>
</antml:invoke>
</antml:function_calls>
<antml:function_calls>
<antml:invoke name="TodoWrite">
<antml:parameter name="todos">[{"content": "Research existing authentication setup", "activeForm": "Researching existin> authentication setup", "status": "completed"}, {"content": "Install passport.js dependency", "activeForm": "Installing passport.js dependency", "status": "in_progress"}, {"content": "Implement authentication system", "activeForm": "Implementing authentication system", "status": "pending"}, {"content": "Run tests to identify bugs", "activeForm": "Running tests to identify bugs", "status": "pending"}, {"content": "Fix any bugs found", "activeForm": "Fixing any bugs found", "status": "pending"}]</antml:parameter>
</antml:invoke>
</antml:function_calls>
Notice how I:
- Completed the research task
- Inserted a NEW task for the blocker (passport.js)
- Set that as
in_progress - All subsequent tasks remain pending
<antml:function_calls>
<antml:invoke name="TodoWrite">
<antml:parameter name="todos">[{"content": "Research existing authentication setup", "activeForm": "Researching existin> authentication setup", "status": "completed"}, {"content": "Install passport.js dependency", "activeForm": "Installing passport.js dependency", "status": "completed"}, {"content": "Implement authentication system", "activeForm": "Implementing authentication system", "status": "completed"}, {"content": "Run tests to identify bugs", "activeForm": "Running tests to identify bugs", "status": "completed"}, {"content": "Fix type error in auth.ts:45", "activeForm": "Fixing type error in auth.ts:45", "status": "in_progress"}, {"content": "Fix missing await in login handler", "activeForm": "Fixing missing await in login handler", "status": "pending"}, {"content": "Fix incorrect redirect after logout", "activeForm": "Fixing incorrect redirect after logout", "status": "pending"}]</antml:parameter>
</antml:invoke>
</antml:function_calls>
Key points:
- I removed the generic "Fix any bugs found" task entirely
- Replaced it with 3 specific bug fix tasks discovered from test results
- Already started on the first bug
Relatedly - this is a good article on some of the other parts of how Claude "thinks" https://karashiiro.leaflet.pub/3m4gf7geefs2l