google-gemini / google-gemini/gemini-cli

Replace WriteToDo with Persistent File-Based Task Tracking (CRUD)

Open
#18,836 3 comments 0 reactions 1 assignee Claimed by @anj-s View on GitHub
🔒 maintainer only area/agent kind/customer-issue priority/p3 status/bot-triaged workstream-rollup
Dominant language
TypeScript
Stars
107k
Forks
14.6k
Avg merge
2d 3h
Merged PRs (30d)
45

Description

The current WriteToDo tool relies on "in-context" task tracking, which maintains the todo list solely within the LLM's conversation history (prompt context). This creates issues with "context rot," high token costs, and total memory loss between sessions.

This issue proposes deprecating WriteToDo in favor of a persistent task tracking system (e.g., a local tasks.json) that allows the agent to maintain state across restarts and manage complex dependencies.

### Proposed Solution

Implement a new set of tools backed by a persistent local file (e.g., .gemini/tasks.json) to replace WriteToDo.

1. New Tool Definitions
The agent should have access to specific CRUD tools rather than just "writing" a list:
task_add(description: str, priority: str, dependency_id: int)
task_list(filter: str) (e.g., "show only 'ready' tasks")
task_update(id: int, status: str)
task_complete(id: int)

2. Storage Backend
Tasks should be serialized to a local file in the working directory.

Benefits
1. Persistence: The agent can pick up exactly where it left off after a restart.
2. Efficiency: We stop burning tokens passing the entire completed history back and forth. The agent only queries task_list when it needs to know what to do next.
3. Complexity: Enables multi-step reasoning where the agent can plan out 20 steps and execute them over several days.

Address concerns and suggestions in https://github.com/google-gemini/gemini-cli/issues/17035
Doc [go/tracker-gemini-cli](http://goto.google.com/tracker-gemini-cli)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.