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

[BUG] Two claude sessions will conflict and overwrite ~/.claude.json

Open marhar opened this issue 7 months ago • 0 comments

Environment

  • Platform (select one): Claude Code
  • Claude CLI version: 0.2.107 (Claude Code)
  • Operating System: macOS 15.4
  • Terminal: Terminal App

Bug Description

Two claude sessions will conflict and overwrite ~/.claude.json.

Steps to Reproduce

  1. Run a first claude session in one terminal.
  2. Run a second claude session in another terminal.
  3. After both sessions have exited, look at ~/.claude.json
  4. You will observe that portions of history are missing.

Expected Behavior

I expected to see the complete history of both sessions.

Actual Behavior

history seemed to be truncated, I could not see some commands executed by one of the sessions.

Additional Context

Presumably related to file output buffering of ~/.claude.json?

marhar avatar May 09 '25 16:05 marhar