[FEATURE] Option to disable cross-session command history in up-arrow

Resolved 💬 3 comments Opened Dec 29, 2025 by EmanuelFaria Closed Jan 1, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

When I press up-arrow to recall previous prompts, I see history from all my Claude Code sessions — not just the current one.

I run multiple sessions simultaneously for different projects. This global history pool is disorienting and error-prone. I want to disable it.

Current Behavior

Up-arrow shows prompts from every session I've ever run, across all projects, mixed together.

Requested Behavior

Add a setting to disable global command history:

// ~/.claude/settings.json
{
  "commandHistoryScope": "session"  // or "project" — anything but global
}

When enabled, up-arrow would only show prompts from the current session (or current project directory). Previous sessions' prompts would not appear.

Why This Matters

  • Running 2-4 concurrent sessions is common for multi-project work
  • Accidentally recalling and executing a prompt meant for a different codebase is a real risk
  • The current behavior adds cognitive load with no opt-out

Environment

  • Platform: macOS
  • Claude CLI version: current
  • Terminal: iTerm2 / VS Code integrated terminal

---

I don't need Anthropic to change the default behavior — just give me a flag to turn it off.

View original on GitHub ↗

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