Feature: scope up/down-arrow prompt history to the current session

Status Open
Reported on v2.1.289
Maintainer reply None cached
Activity 1 comment · opened Oct 5, 2026

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

  1. Open two claude sessions in the same cwd.
  2. Type a prompt in session A.
  3. 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.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗