From claude-code-config
Discovers, searches, and restores hidden Claude desktop app sessions across multiple account IDs on Mac/Windows. Useful for recovering lost sessions after account switches or multi-account use.
npx claudepluginhub anastasiyaw/claude-code-configThis skill uses the workspace's default tool permissions.
Claude desktop app (Mac/Windows native) stores sessions per `<accountId>/<orgId>/`. When you switch accounts, old sessions become invisible in UI — they remain on disk but `LocalSessionManager.loadSessions()` only reads the active accountId folder.
Transfers Claude Desktop Code-tab sessions between accounts by copying or moving metadata files. Run before switching accounts due to usage limits for seamless sidebar visibility after login.
Guides Claude Desktop setup: macOS/Windows install, Git worktrees for parallel sessions, .worktreeinclude config, cloud launches, env vars, MCP extensions (.mcpb), vs CLI. Delegates to docs-management.
Prevents silent decimal mismatch bugs in EVM ERC-20 tokens via runtime decimals lookup, chain-aware caching, bridged-token handling, and normalization. For DeFi bots, dashboards using Python/Web3, TypeScript/ethers, Solidity.
Share bugs, ideas, or general feedback.
Claude desktop app (Mac/Windows native) stores sessions per <accountId>/<orgId>/. When you switch accounts, old sessions become invisible in UI — they remain on disk but LocalSessionManager.loadSessions() only reads the active accountId folder.
This is GitHub issue #48511, open since April 2026 with no Anthropic fix. Issue #26452 has 40 comments documenting the same loss.
This skill is a community workaround. Use at your own risk — see Caveats.
| Install type | Path |
|---|---|
| Win32 .exe install (recommended) | %APPDATA%\Claude\claude-code-sessions\<acct>\<org>\local_<sid>.json |
| Windows MSIX (Microsoft Store) | %LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\claude-code-sessions\<acct>\<org>\ — see issue #48362 (atomic-rename bug breaks this entirely) |
| macOS | ~/Library/Application Support/Claude/claude-code-sessions/<acct>/<org>/local_<sid>.json |
| Legacy (pre-Feb 2026) | same path, but folder name was local-agent-mode-sessions/ |
Source: bundled JS .vite/build/index.js line 771: const $6t="claude-code-sessions". May change in any release.
local_*.json{
"sessionId": "uuid",
"cliSessionId": "uuid",
"cwd": "C:\\path\\to\\project",
"originCwd": "...",
"createdAt": <unix ms timestamp OR ISO string>,
"lastActivityAt": <unix ms timestamp OR ISO string>,
"model": "claude-opus-4-7-...",
"effort": "default",
"isArchived": false,
"title": "Human-readable title shown in UI",
"permissionMode": "default",
"remoteMcpServersConfig": [],
"completedTurns": 12
}
NB: timestamp format is inconsistent — some sessions use Unix ms (int), others ISO string. Parser must handle both.
Script: scripts/sessions_registry.py
python scripts/sessions_registry.py # generate + auto-open in default browser
python scripts/sessions_registry.py --no-open # generate only
python scripts/sessions_registry.py --output /custom/path.html
Produces a self-contained HTML registry with:
~/.claude/desktop-migrations.jsonl)claude-code-sessions/ (current) AND local-agent-mode-sessions/ (legacy pre-Feb 2026)Use when: user wants to browse the archive visually before deciding what to restore. After clicking Restore, paste the copied command in chat with Claude (it knows the next step) or run it directly in terminal.
Script: scripts/sessions_inventory.py
Scans all <accountId>/<orgId>/local_*.json, prints grouped table with title/cwd/size/lastActivityAt sorted by recency. Includes cross-account view (which projects appear in multiple accountIds — useful when same user worked on the same project under different accounts).
Script: scripts/sessions_find.py
python sessions_find.py "<query>" # substring in title or cwd
python sessions_find.py "<query>" --account <prefix> # filter by accountId
python sessions_find.py --since 2026-04-01 # date filter
python sessions_find.py --untitled # parse-failed or empty
Output is top-N matches sorted by recency, with copy-pasteable restore command.
Script: scripts/sessions_restore.py
python sessions_restore.py <sid8> # auto-detect active accountId
python sessions_restore.py <sid8> --to <acct> # explicit target
python sessions_restore.py <sid8> --dry-run # plan only
Behaviour:
local_<sid>.json into <targetAcct>/<sameOrgId>/~/.claude/desktop-migrations.jsonl audit logAfter restore: restart Claude desktop app to see session in UI.
Anthropic added validation that blocks sessions "not originally created on the current machine". Cross-account migration on the SAME machine appears to work as of April 2026, but cross-machine copies are broken. Anthropic likely tightens validation further in upcoming releases.
Next desktop architecture moves storage to vm_bundles/claudevm.bundle/sessiondata.img (disk-image format). When released, file-copy migration of local_*.json may stop working entirely. This toolkit has finite shelf life.
If you installed Claude desktop from Microsoft Store, fs.rename('.tmp', '.json') fails with EXDEV inside MSIX sandbox — sessions never persist at all. Switch to Win32 .exe install.
With 700+ sessions in one accountId, the app's session list becomes unreadable. Prefer selective restore one-at-a-time when you actually need a specific thread.
Drift serious work into Claude Code CLI. CLI sessions live in ~/.claude/projects/<slug>/<UUID>.jsonl, are account-agnostic, stable storage, open JSONL format, survive desktop app reorgs. Use desktop app for quick UI but not for long-running projects.
scripts/sessions_registry.py — interactive HTML registry, opens in browserscripts/sessions_inventory.py — full text table (grep-friendly)scripts/sessions_find.py — substring searchscripts/sessions_restore.py — selective copy with verify and audit logAll four scripts detect platform via sys.platform and pick the right path automatically — no flags needed on Mac.
~/Library/Application Support/Claude/claude-code-sessions/<acct>/<org>/local_<sid>.json~/Library/Application Support/Claude/local-agent-mode-sessions/<acct>/<org>/local_<sid>.jsonopen <html> (system default browser)mdfind -onlyin ~/Library/Application\ Support/Claude/ "<query>" works on session JSONs (indexes content), faster than find for one-off lookupsopen -R ~/Library/Application\ Support/Claude/claude-code-sessions/<acct>/<org>/local_<sid>.jsonPublic domain. This is a community workaround for an Anthropic bug; share freely.