claude --resume allows concurrent access to same session from multiple terminals
Resolved 💬 3 comments Opened Mar 26, 2026 by ppiankov Closed Mar 29, 2026
When resuming a session with claude --resume <id>, there is no check for whether another claude process already has that session open. Two terminals can simultaneously write to the same session JSONL file.
Consequences
- Interleaved writes to the session file (no file locking)
- Both instances see each other's entries, leading to incoherent context
- Potential file corruption from partial/concurrent writes
Steps to reproduce
- Start a Claude Code session in Terminal 1
- In Terminal 2, run
claude --resume <same-session-id> - Both terminals are now active on the same session file
Expected behavior
Claude should either refuse to resume a session that's already open (with a message like "session already open in PID X") or use file locking to prevent concurrent writes.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗