/harness:desktop-sessions-discoveryfrom Harness (обвязка)
Discovers, searches, and selectively restores Claude desktop app sessions hidden across multiple accountIds. Useful when sessions disappear after switching accounts.
Ships in Harness (обвязка). Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
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.
Related reports: #48511 was opened 2026-04-15 and is closed as not planned; #26452 was opened 2026-02-18 and remains open as checked 2026-09-06. These are version-specific user reports, not proof that the installed build has the same cause or that a fix does not exist.
This skill is a community workaround. Use at your own risk — see Caveats.
| Install type | Path |
|---|---|
| Win32 .exe install | %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>\ — issue #48362 reports an atomic-rename failure in a specific environment; verify the current local error before attributing a missing session to it. |
| 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 "${CLAUDE_SKILL_DIR}/scripts/sessions_registry.py" # generate + auto-open in default browser
python "${CLAUDE_SKILL_DIR}/scripts/sessions_registry.py" --no-open # generate only
python "${CLAUDE_SKILL_DIR}/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 the user wants to browse the archive visually. When the user has already selected and authorized a specific restore, the agent performs the scoped dry-run, backup/copy and verification itself through available approved tools; do not assign clipboard/terminal work to the user. A generated restore command is an input to inspect, not authorization by itself.
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, cwd, or session ID
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 a verified copy, inspect the current app's documented reload/restart requirement and
active work before restarting. File parity alone does not prove a session is visible or resumable.
The default target-account detection is an mtime heuristic: inspect the signed-in destination
and use explicit --to for an authorized restore; never treat newest mtime as account authority.
Historical reports described machine-origin validation. Same-machine success or cross-machine failure from those builds does not establish current compatibility. Check the installed version, actual storage and error before using this workaround; do not predict future validation changes.
The linked historical report describes a disk-image storage variant. Discover the installed layout first; these scripts only support the enumerated JSON layouts. Do not manipulate disk images or infer an announced roadmap from an issue. An unsupported layout is a measured limit.
The issue reports EXDEV during atomic rename in a specific MSIX environment. Check current package version, path and observed error before attributing missing history to it. Do not switch installation channels or claim all Store sessions fail based on that historical report.
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.
Preserve the project's canonical transcript archive and durable task/handoff state regardless of UI choice. CLI and desktop have different persistence/restore contracts; neither is a substitute for verified backups. Choose a runtime from the required capabilities and observed behavior, not a universal recommendation to move serious work away from desktop.
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 session-file discovery and recovery tool; its usefulness depends on the verified local layout and failure, not a universal product-bug diagnosis.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub anastasiyaw/codex-claude-code-config --plugin harness60 skills in this plugin
/agent-harness-designDesigning agent harnesses and tool systems — risk taxonomy for tools, permission decisions, draft/commit pattern, structured tool results, agent budgets (10 types), context trust labels against prompt injection, plan-artifact, approval records, observability and traces, evals (13 categories), event model, streaming buffering, 3rd-party skill install checklist, agentic RAG, self-improving SOP loops, model policy, reasoning effort, and Programmatic Tool Calling adoption gates. Use when building a new Agent SDK app, custom orchestrator, MCP server, Cloudflare Worker with tool calls, agentic RAG pipeline, model router, or model-tier policy; when designing tools and permissions; when writing an agent loop; or when you need trust labels for external content. Do NOT use for improving or auditing an already-built harness (use harness-audit / harness-design instead), nor for ordinary Claude Code sessions where the harness is already given./agents-best-practicesUse when designing, auditing, refactoring, or explaining an agentic harness for any domain, especially when work must continue from a measured gap to verified completion. Covers provider-neutral loops, tools, permissions, environment adaptation, planning, durable workflow state, context, skills, observability, evals, and safety for OpenAI, Anthropic, and compatible APIs. Not for implementing an ordinary app feature or reviewing one concrete diff.Other plugins' skills for the same job