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

Resolved 💬 3 comments Opened May 9, 2025 by marhar Closed Jan 4, 2026

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?

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗