Todos should be project-specific, not globally shared
Resolved 💬 3 comments Opened Jul 22, 2025 by vanman2024 Closed Aug 19, 2025
Problem Description
Currently, all todo files are stored in a single shared directory (~/.claude/todos/) regardless of which project they belong to. This causes several issues:
Current Structure
~/.claude/
├── projects/
│ ├── -home-user-project1/ # Project-specific conversations ✓
│ └── -home-user-project2/ # Project-specific conversations ✓
└── todos/ # ALL todos mixed together ✗
├── session1-todos.json # Which project? Unknown
└── session2-todos.json # Which project? Unknown
Issues This Causes
- Cross-Project Contamination: When recovering a session, todos from completely unrelated projects appear, causing confusion. For example, "issues 116-120" from one project showing up when working on a different repository.
- No Project Context: Todo filenames only contain session IDs with no project identifier, making it impossible to determine which project they belong to.
- Session Recovery Problems: The recovery process (
ls -t ~/.claude/todos/*.json) returns todos from ALL projects, not just the current one.
- Scale Issues: With hundreds of accumulated todo files, finding project-relevant ones becomes impossible.
Proposed Solution
Todos should be stored in project-specific directories, mirroring the existing conversation log structure:
~/.claude/
└── projects/
├── -home-user-project1/
│ ├── conversations/
│ │ └── session1.jsonl
│ └── todos/
│ └── session1-todos.json
└── -home-user-project2/
├── conversations/
└── todos/
Benefits
- Project Isolation: Each project's todos remain separate
- Better Recovery: Session recovery only finds relevant todos
- Cleaner Organization: Matches the existing project-based structure
- Prevents Data Loss: When cleaning up one project, won't accidentally delete todos from another
Implementation Notes
The TodoWrite tool would need to be updated to:
- Determine the current project context
- Write to
~/.claude/projects/{project-path}/todos/instead of~/.claude/todos/ - Session recovery should look in the project-specific directory
This change would significantly improve the developer experience when working on multiple projects with Claude Code.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗