← ClaudeAtlas

claude-code-projects-jsonl-worktree-fanoutlisted

Search prior-session JSONL transcripts across worktree-namespaced project directories under `~/.claude/projects/`. Use when: (1) the user asks "find a previous session about X" or "remind me when we discussed Y" for a project that uses git worktrees, (2) you grep the canonical `~/.claude/projects/<project-dir>/*.jsonl` and the matching session isn't there, (3) you need to enumerate every conversation that touched a project regardless of which worktree it ran from. Claude Code stores each git worktree's session JSONLs under a separately-namespaced project directory (`<project-name>--claude-worktrees-<worktree-name>/`), not under the canonical `<project-name>/` directory. Searching only the canonical dir silently misses sessions run from worktrees — even though the user experienced them as "in the same project". Sister to the `git-worktree` skill family at the Claude-Code-state layer.
wan-huiyan/agent-traffic-control · ★ 2 · AI & Automation · score 79
Install: claude install-skill wan-huiyan/agent-traffic-control
# Claude Code projects/ JSONL transcripts fan out across worktrees ## Problem The user asks: *"find that session ~2 weeks ago where we discussed X"*. You grep `~/.claude/projects/-Users-huiyanwan-Documents-foo-project/*.jsonl` for keywords, get partial or zero hits, and report "couldn't find it" — but the session **does** exist, just under a different directory because it ran inside a git worktree. Claude Code maps **each git worktree to its own project directory** under `~/.claude/projects/`. The canonical project at `/Users/<user>/Documents/foo-project/` becomes: ``` ~/.claude/projects/-Users-<user>-Documents-foo-project/ ``` But a worktree created via `git worktree add .claude/worktrees/<wt-name>` becomes a separate sibling: ``` ~/.claude/projects/-Users-<user>-Documents-foo-project--claude-worktrees-<wt-name>/ ``` Each worktree dir holds its own JSONL transcripts for sessions started from that working directory. A project that's seen heavy worktree use (typical for `superpowers:using-git-worktrees` workflow) can have **dozens** of sibling dirs. ## Context / Trigger Conditions - User asks about a prior session, conversation, or work in a project - Project uses `superpowers:using-git-worktrees` or has `.claude/worktrees/` populated - Your initial grep of `~/.claude/projects/<project-name>/*.jsonl` returned fewer hits than expected, or none - You want to enumerate every session that ever ran against the project (e.g. for a knowledge audit) - Symptom: `~/.claude/proj