[BUG] Todo lists are unexpectedly shared between the main conversation and Task agents, with TodoWrite operations completely replacing the entire list

Resolved 💬 3 comments Opened Jun 9, 2025 by dmora Closed Jun 10, 2025

Environment

  • Platform (select one):
  • [ ] Anthropic API
  • [ ] AWS Bedrock
  • [X] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.17 (Claude Code)
  • Operating System: macOS (Darwin 24.3.0)
  • Terminal: Apple Terminal

Bug Description

Todo lists are unexpectedly shared between the main conversation and Task agents, with TodoWrite operations completely replacing the entire list rather than maintaining separate contexts.

Steps to Reproduce

  1. Create a todo list using TodoWrite in the main conversation
  2. Launch a Task agent and ask it to create its own todo list using TodoWrite
  3. Check the todo list state using TodoRead in the main conversation
  4. Observe that the Task agent's todo list has completely replaced the original

Expected Behavior

Task agents should either have isolated todo list contexts (separate from main conversation), or append to existing todo lists rather than replacing them entirely.

Actual Behavior

Task agents share the same todo list state as the main conversation, and TodoWrite operations always replace the entire todo list with the provided items. Previous items are only preserved if explicitly included in the new TodoWrite call, requiring manual preservation of existing state.

Additional Context

This behavior contradicts the stated "stateless" nature of Task agents and can lead to unexpected loss of todo items when Task agents are used for auxiliary tasks

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗