Skip to main content

Advanced Workflows & Automation

Planning with Todo Lists

0:00
LearnStep 1/3

Planning with Todo Lists

Mastering Complex Workflows with write_todos

In complex software engineering tasks, maintaining a clear mental model of the progress is crucial. The write_todos tool allows the Gemini CLI agent to create, manage, and share a structured plan with the user.

The write_todos Tool

This tool is designed for multi-step tasks where execution spans several turns or involves complex dependencies. It helps in:

  • Breaking down tasks: Decomposing a vague request into actionable subtasks.
  • Tracking progress: Visualizing what is done, what is in progress, and what is left.
  • Dynamic Planning: Updating the plan as new information is discovered (e.g., adding a task to fix a bug found during testing).

Task States

Each todo item has a status:

  • pending: Not yet started.
  • in_progress: Currently being worked on (limit to one at a time).
  • completed: Successfully finished.
  • cancelled: Determined to be unnecessary.

Best Practices

Use the todo list when a request cannot be satisfied in a single turn. Update the list immediately when changing task focus or completing a step. This keeps the user informed and the agent focused.