[BUG] Race condition in claude task list management

Status Fixed / completed
Reported on v2.1.19
Maintainer reply None cached
Activity 5 comments · opened Jan 26, 2026 · closed Jan 28, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

If two different Claude sessions attempt to create a task in the same todo list, they will override reach other.

What Should Happen?

Creating tasks should be done atomically. Most modern file system support atomic file creation, so I am hoping this would be straight-forward (for example, using open('file.txt', 'x') in Python).

Steps to Reproduce

In one session:

CLAUDE_CODE_TASK_LIST_ID=bug-demo claude

Then ask it to create three tasks.

In another session:

CLAUDE_CODE_TASK_LIST_ID=bug-demo claude

Ask it to create a new task called "foo bar". Then go back to the original session, ask it to create a new task called "bar baz", and you will see it will override the previous one.

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.19

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

_No response_

View original on GitHub ↗

5 Comments

github-actions[bot] · 8 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/20637
  2. https://github.com/anthropics/claude-code/issues/20992
  3. https://github.com/anthropics/claude-code/issues/3117

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

josevalim · 8 months ago

Those issues are unrelated. :)

yordis · 8 months ago

@josevalim downvote to prevent auti-closure, did it just in case. I am not sure if you have to vote on it

josevalim · 8 months ago

Fixed in latest.

github-actions[bot] · 8 months ago

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.