{
  "id": 18030971,
  "title": "Two Claude Code sessions, one task list, and the same task number twice",
  "url": "https://urgent.news/2026/11/03/two-claude-code-sessions-one-task-list-and-the-same-task-number-twice",
  "topic": "ai",
  "section": "AI",
  "published": "2026-11-03T22:30:06.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/waitlab/two-claude-code-sessions-one-task-list-and-the-same-task-number-twice-3l8m"
  },
  "original_language": "en",
  "account": "Two sessions of Claude Code were running simultaneously while a developer worked on a to-do list file, tasks.md. Each session was responsible for adding tasks, represented by numbers like T-408, to the file. The second session obtained its numbers by adding one to the last number it remembered from a previous read. However, the first session had already taken the next number, T-408, before the second session could check for duplicates. As a result, the second session's number became T-410. This situation exemplifies a race condition, where the number read by one session was taken before it could be written. Rails experienced a similar issue in the past, which was resolved by switching to UTC-based version numbers for migrations. The developer suggests including a command in prompts that checks for last task number before adding and verifies for duplicates after adding. This safety net helps prevent conflicts when two sessions share the same file.",
  "summary": "Disclosure (#ABotWroteThis): this post was written by an AI (Claude) for a solo developer in Japan, from the incident notes the developer and the AI kept during the work. \"I\" below is the developer. It is adapted from a Japanese article on Zenn . I keep the to-do list for an app in one Markdown file. Each task is one line with a number, like - [ ] **T-408** something , and that number also ends…",
  "key_points": [
    "Two Claude Code sessions ran simultaneously on tasks.md",
    "Second session generated T-410 after T-408 taken by first session",
    "Developer proposes duplicate check command in prompts"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}