Tested against Claude Code CLI v2.1.121 on Windows 11 — 2026-05-19. Claude Desktop version v1.8089.1
Something broke somewhere with your sessions in Claude Desktop. Because I'm a bit special I've broken my Desktop sessions in lots of different ways. I made this to help you diagnose and hopefully fix it if something has gone wrong for you too.
This runs best from a Claude Code CLI session, not from Claude Desktop because the Desktop app needs to be closed to apply the fixes. If you run it from Desktop then, the tool will detect that and warn you and give you the instructions on what to do if you're still more comfortable running from Claude Desktop.
Step 1 — open a CLI session
Open Windows Terminal, PowerShell, or cmd, then run:
claude
That starts Claude Code in your terminal.
Step 2 — paste this prompt
My Claude Code sessions are broken on Windows. Please help me fix them using https://github.com/BasedGPT/claude-code-session-recovery
1. Clone the repo and cd into it: `git clone https://github.com/BasedGPT/claude-code-session-recovery` then `cd claude-code-session-recovery`
2. Read AGENTS.md — it's written for AI assistants and explains how to use this repo safely
3. Read docs/session-recovery.md to understand the symptoms and repair tools
4. Run `python tools/diagnose.py` — it auto-detects all file paths from the environment, no configuration needed
5. For each repair command: run the dry-run first, show me the full output, and wait for me to say "yes, apply" before adding --apply
6. Tell me what was found and what was fixed
git clone https://github.com/BasedGPT/claude-code-session-recovery
cd claude-code-session-recovery
python tools/diagnose.py
Read the output. It prints what it found, the matched problem, and the exact repair command. The diagnostic is read-only — safe to run at any time.
Sessions in your Claude Desktop session list are broken or missing → docs/session-recovery.md
You use Claude Code worktrees and something broke → docs/worktree-lifecycle.md
You want to understand the bug before running anything → docs/architecture.md
You want to know what the scripts touch before running them → SECURITY.md
You want to see which sessions are in which group, or groups disappeared after a Desktop update → python tools/groupings/list_groupings.py
You are an AI assistant helping a user with this repo → AGENTS.md
Run python tools/diagnose.py first — it identifies your specific problem and prints the exact command to run.
| Problem | Run this | Details |
|---|---|---|
| Session missing conversation history | python tools/diagnose.py |
session-recovery.md#blank-pane-missing-cli |
| Conversation history missing from disk | python tools/diagnose.py |
session-recovery.md#cli-points-missing-jsonl |
| Two sessions, same conversation history | python tools/diagnose.py |
session-recovery.md#duplicate-synth-metadata |
| Sessions started from outside any project folder | python tools/diagnose.py |
session-recovery.md#old-root-cwd-reference |
| One project, two sets of sessions | python tools/diagnose.py |
session-recovery.md#junction-realpath-slug-mismatch |
| Sessions missing from Desktop session list | python tools/diagnose.py |
session-recovery.md#orphan-jsonl-no-metadata |
| Group assignments wiped or missing after Desktop update | python tools/groupings/list_groupings.py |
architecture.md#session-grouping-layer — read-only diagnostic; no automated fix |
Requirements: Python 3.11+, Windows 11. No dependencies outside the standard library.