[FEATURE] Scope prompt input history per project/instance

Resolved 💬 3 comments Opened Feb 6, 2026 by hrishikeshs Closed Feb 6, 2026

Problem

When running multiple Claude Code instances simultaneously (e.g., via separate terminals or a multi-agent orchestration tool like Magnus), arrow-key history navigation (up/down) shows prompts from all running instances, not just the current one. This is because input history is stored in a single shared file.

For users running parallel agents — e.g., a PM agent, a worker agent, and a reviewer agent each in their own terminal — the history from all of them gets interleaved, making prompt recall via arrow keys noisy and unhelpful.

Expected Behavior

Input history should be scoped so that navigating with arrow keys only shows prompts relevant to the current context. Possible scoping strategies:

  • Per-project (most useful) — history tied to the working directory/project, so different projects have independent history
  • Per-instance — each running Claude Code process maintains its own history for the duration of the session
  • Per-session — history scoped to the session ID

Per-project scoping would likely cover the most common case while keeping history useful across sessions within the same project.

Reproduction

  1. Open two terminals in different project directories
  2. Run claude in both
  3. Send a few prompts in each
  4. Press up arrow in either instance — prompts from the other instance appear

Context

This is especially relevant for multi-agent workflows where multiple Claude Code instances run in parallel on different tasks. The cross-instance history pollution makes arrow-key recall essentially unusable in that context.

View original on GitHub ↗

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