[BUG] Race condition in claude task list management
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_
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗