[BUG] Command history from other sessions appears when using arrow keys in a new session

Resolved 💬 6 comments Opened Feb 5, 2026 by jaried Closed Jun 13, 2026

[BUG] Command history from other sessions appears when using arrow keys in a new session

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code (2.1.50)

What's Wrong?
When multiple Claude Code sessions are running concurrently in different terminals, after exiting one session with /exit and resuming it with claude -c, the command history (accessed via Up/Down arrow keys) contains command history from other concurrent sessions, not just the current session.

What Should Happen?
The Up/Down arrow key command history should only show commands from the current session, not mixed with commands from other concurrent sessions.

Steps to Reproduce

  1. Open multiple terminals, run claude in each terminal
  2. Enter some different commands in each session (e.g., "help" in terminal 1, "model" in terminal 2)
  3. In one of the sessions, enter /exit to exit
  4. In the same terminal, run claude -c to resume the session
  5. Press Up/Down arrow keys to browse command history
  6. Observe that commands from other concurrent sessions appear in the history

Is this a regression?
Unknown - not sure if this worked differently in previous versions.

Claude Code Version
2.1.50 (Claude Code)

Platform
Claude API (anthropic)

Operating System
Windows 10

Terminal/Shell
Windows Terminal

Additional Information
This causes confusion when resuming a session as users may accidentally execute commands intended for a different session. Each session should maintain its own isolated command history.

View original on GitHub ↗

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