claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

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

Open dmora opened this issue 6 months ago • 1 comments

Environment

  • Platform (select one):
    • [ ] Anthropic API
    • [ ] AWS Bedrock
    • [X] Google Vertex AI
    • [ ] Other:
  • 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

dmora avatar Jun 09 '25 03:06 dmora

Thank for reporting, we're looking into this

sid374 avatar Jun 09 '25 05:06 sid374

This should be fixed in the next release!

sid374 avatar Jun 10 '25 07:06 sid374

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Aug 09 '25 14:08 github-actions[bot]