claude-code - 💡(How to fix) Fix Scope prompt input history per session name (--name)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
RAW_BUFFERClick to expand / collapse

Problem

When running multiple Claude Code sessions from the same directory (e.g., using claude --name "task A" and claude --name "task B"), the up-arrow prompt history is shared between them. This creates noise — prompts from unrelated sessions interleave when navigating history.

Current behavior

Input history is stored per project directory. All sessions in the same directory share one history file regardless of their --name.

Expected behavior

When a session is started with --name, its input history should be scoped to that name. Up-arrow in "task A" should only show prompts from previous "task A" sessions, not from "task B".

Unnamed sessions could continue using the shared per-directory history as a fallback.

Use case

Power users running parallel named sessions for different work streams in the same repo (e.g., one for a feature branch, one for code review, one for debugging). The --name flag already scopes conversation resume — extending it to input history would complete the isolation.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

When a session is started with --name, its input history should be scoped to that name. Up-arrow in "task A" should only show prompts from previous "task A" sessions, not from "task B".

Unnamed sessions could continue using the shared per-directory history as a fallback.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING