Feature: scope up/down-arrow prompt history to the current session
Problem
With several concurrent Claude Code sessions in the same project directory, the up/down-arrow prompt recall shows prompts typed in other sessions. Users running many parallel sessions in one repo expect only the prompts entered in the session at hand.
Repro
- Open two
claudesessions in the same cwd. - Type a prompt in session A.
- Press up-arrow in session B: A's prompt appears.
Claude Code 2.1.289, Windows 10, PowerShell + Git Bash.
What exists today
~/.claude/history.jsonl entries already carry sessionId and project:
{"display":"...","pastedContents":{},"timestamp":1791240208709,"project":"E:\carlytics","sessionId":"682f5b7b-..."}
Recall filters by project only. No setting, flag or env var scopes it to the session.
Proposal
A setting such as historyScope: "session" | "project" | "global" (default project to keep current behaviour), honoured by the arrow-key recall. The data to filter on is already recorded, so this is a filter on the existing file.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗