[FEATURE] Unified conversation history across worktrees and project paths

Resolved 💬 2 comments Opened Feb 22, 2026 by ilanp-ob Closed Feb 22, 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

Problem

Claude Code stores conversation history keyed by filesystem path (~/.claude/projects/<path-encoded>/). When using worktrees (via
/worktree or --worktree), each worktree gets its own separate history bucket because it has a different path. This means:

  1. Fragmented history — Sessions for the same repo are scattered across multiple project folders (e.g., -Users-me-dev-houston,

-Users-me-dev-houston-OPS-1234, -Users-me-dev-houston-OPS-5678)

  1. /resume only shows current path — You can't see or resume sessions from worktrees when you're in the main project directory, and

vice versa

  1. History survives but is inaccessible — When a worktree is deleted, the session data still exists in ~/.claude/projects/ but

there's no way to discover or resume those sessions through the UI

Expected behavior

  • /resume (or a new command like /history) should show sessions from all paths associated with the same git repository, not just the

current working directory

  • Sessions from deleted worktrees should still be discoverable and resumable from the main project directory
  • Optionally, a global history view across all projects (e.g., claude --history or /history --all)

Current workaround

Manually grepping through ~/.claude/projects/ and ~/.claude/history.jsonl, which is cumbersome and doesn't integrate with /resume.

Additional context

This is especially relevant for teams that use worktrees heavily as part of their workflow. Claude Code's own /worktree feature
encourages this pattern, but the history fragmentation makes it hard to find previous conversations about the same codebase.

Proposed Solution

unite all history files somehow?
figure that we are on worktree and put the history file inside the main folder

Alternative Solutions

_No response_

Priority

Critical - Blocking my work

Feature Category

CLI commands and flags

Use Case Example

_No response_

Additional Context

_No response_

View original on GitHub ↗

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