Restore Legacy Sessions
zai-org/ZCode
A skill your agent uses when ZCode needs to inspect, plan, or execute restoration of old ACP-era ZCode sessions from ~/.zcode/v2/sessions into the new ZCode task/session stores.
Discover, search, and selectively restore Claude desktop app sessions hidden across multiple accountIds.
$ npx skills add AnastasiyaW/codex-claude-code-config --skill desktop-sessions-discovery -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install AnastasiyaW/codex-claude-code-config desktop-sessions-discovery --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/AnastasiyaW/codex-claude-code-config.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/operational/desktop-sessions-discovery .claude/skills/desktop-sessions-discovery && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "desktop-sessions-discovery" agent skill from https://github.com/AnastasiyaW/codex-claude-code-config/tree/main/skills/operational/desktop-sessions-discovery into .claude/skills/desktop-sessions-discovery/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "desktop-sessions-discovery", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/AnastasiyaW/codex-claude-code-config/tree/main/skills/operational/desktop-sessions-discoveryType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add AnastasiyaW/codex-claude-code-config --skill desktop-sessions-discovery -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install AnastasiyaW/codex-claude-code-config desktop-sessions-discovery --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/AnastasiyaW/codex-claude-code-config.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/operational/desktop-sessions-discovery .agents/skills/desktop-sessions-discovery && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "desktop-sessions-discovery" agent skill from https://github.com/AnastasiyaW/codex-claude-code-config/tree/main/skills/operational/desktop-sessions-discovery into .agents/skills/desktop-sessions-discovery/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "desktop-sessions-discovery", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add AnastasiyaW/codex-claude-code-config --skill desktop-sessions-discovery -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install AnastasiyaW/codex-claude-code-config desktop-sessions-discovery --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/AnastasiyaW/codex-claude-code-config.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/operational/desktop-sessions-discovery .cursor/skills/desktop-sessions-discovery && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "desktop-sessions-discovery" agent skill from https://github.com/AnastasiyaW/codex-claude-code-config/tree/main/skills/operational/desktop-sessions-discovery into .cursor/skills/desktop-sessions-discovery/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "desktop-sessions-discovery", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/AnastasiyaW/codex-claude-code-config.git --path skills/operational/desktop-sessions-discovery--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add AnastasiyaW/codex-claude-code-config --skill desktop-sessions-discovery -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install AnastasiyaW/codex-claude-code-config desktop-sessions-discovery --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/AnastasiyaW/codex-claude-code-config.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/operational/desktop-sessions-discovery .gemini/skills/desktop-sessions-discovery && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "desktop-sessions-discovery" agent skill from https://github.com/AnastasiyaW/codex-claude-code-config/tree/main/skills/operational/desktop-sessions-discovery into .gemini/skills/desktop-sessions-discovery/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "desktop-sessions-discovery", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install AnastasiyaW/codex-claude-code-config desktop-sessions-discoveryInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add AnastasiyaW/codex-claude-code-config --skill desktop-sessions-discovery -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/AnastasiyaW/codex-claude-code-config.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/operational/desktop-sessions-discovery .github/skills/desktop-sessions-discovery && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "desktop-sessions-discovery" agent skill from https://github.com/AnastasiyaW/codex-claude-code-config/tree/main/skills/operational/desktop-sessions-discovery into .github/skills/desktop-sessions-discovery/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "desktop-sessions-discovery", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add AnastasiyaW/codex-claude-code-config --skill desktop-sessions-discovery -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install AnastasiyaW/codex-claude-code-config desktop-sessions-discovery --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/AnastasiyaW/codex-claude-code-config.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/operational/desktop-sessions-discovery .opencode/skills/desktop-sessions-discovery && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "desktop-sessions-discovery" agent skill from https://github.com/AnastasiyaW/codex-claude-code-config/tree/main/skills/operational/desktop-sessions-discovery into .opencode/skills/desktop-sessions-discovery/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "desktop-sessions-discovery", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
desktop-sessions-discoveryDiscover, search, and selectively restore Claude desktop app sessions hidden across multiple accountIds.
Desktop Sessions Discovery is an agent skill from AnastasiyaW/codex-claude-code-config. Discover, search, and selectively restore Claude desktop app sessions hidden across multiple accountIds. Use when user mentions "missing sessions after account switch", "lost desktop sessions", "where do my old sessions live", or runs multiple Claude accounts on the same machine. Do NOT use for Claude Code CLI session history or resuming work within one session — this only recovers the native desktop app's per-accountId session files; for in-session continuity use handoffs.
Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts (for example `scripts/sessions_find.py`, `scripts/sessions_inventory.py` and `scripts/sessions_registry.py`).
The repository describes itself as: Claude Code, Codex, and multi-agent configuration system: principles, hooks, skills, and workflow patterns for AI-assisted development. The licence is MIT.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 3601289. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 5 files in scripts/ (Python), which the agent can run.
Shell commands in SKILL.md call:
pythonFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
github.commedium.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Desktop Sessions Discovery loads about 2.4k tokens when it runs. Until then it costs about 126 tokens; SKILL.md has 862 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from AnastasiyaW/codex-claude-code-config at commit 3601289, republished under its MIT licence (© AnastasiyaW). 862 words, ~2,371 tokens.
.claude/skills/desktop-sessions-discovery/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.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 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.htmlProduces 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 emptyOutput 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 onlyBehaviour:
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.
© AnastasiyaW, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 5 other files (scripts) in skills/operational/desktop-sessions-discovery of AnastasiyaW/codex-claude-code-config.
Open the folder on GitHubat commit 3601289
Desktop Sessions Discovery next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Desktop Sessions Discovery this skillAnastasiyaW/codex-claude-code-config | 154 | — | ~2.4k | Automated safety check: Pass | MIT | |
| Restore Legacy Sessionszai-org/ZCode | 7.7k | — | ~1.2k | Automated safety check: Pass | Apache-2.0 | |
| Session Compaction And Restoremvschwarz/openrig | 6.8k | — | ~2.2k | Automated safety check: Pass | Apache-2.0 | |
| Context Restoregarrytan/gstack | 136k | — | ~10k | Automated safety check: Notes | MIT | |
| Session Handoffsickn33/agentic-awesome-skills | 47k | — | ~1.8k | Automated safety check: Notes | MIT | |
| Fal Restorenexu-io/open-design | 100k | — | ~302 | Automated safety check: Pass | Apache-2.0 |
zai-org/ZCode
A skill your agent uses when ZCode needs to inspect, plan, or execute restoration of old ACP-era ZCode sessions from ~/.zcode/v2/sessions into the new ZCode task/session stores.
mvschwarz/openrig
A skill your agent uses when reasoning about what survives compaction/context-loss/restart/seat-refresh, designing a high-fidelity restore packet, or distinguishing native runtime resume vs fork vs…
garrytan/gstack
Reloads the most recent saved working state so you can continue a task after a break, a new session or a switch between workspaces.
sickn33/agentic-awesome-skills
A skill your agent uses when context approaches capacity, before /clear or /compact, when switching tasks, or when ending a coding session: produces a structured handoff artifact for the next session.
nexu-io/open-design
Restore and fix image quality — deblur, denoise, fix faces, and restore old documents using fal.ai's hosted restoration models.
ruvnet/ruflo
Persist and restore agent sessions across conversations with state snapshots
AnastasiyaW/codex-claude-code-config
Find likely software bugs in a codebase, rank concrete bug candidates, and prove or reject them with focused regression tests before proposing a fix.
AnastasiyaW/codex-claude-code-config
A skill your agent uses when implementing Motion or Framer Motion in React/JavaScript: interactive UI components, micro-interactions, gestures, layout or page transitions, and scroll-based animation.
AnastasiyaW/codex-claude-code-config
Plan-based verification - freeze acceptance criteria before building, then verify after with an independent fresh-context agent (the builder must not verify their own work).
AnastasiyaW/codex-claude-code-config
Написание и запуск Claude Code dynamic workflows (JS-оркестратор субагентов).
AnastasiyaW/codex-claude-code-config
A skill your agent uses when: NotebookLM, notebooklm MCP, large documentation sets, courses, books, papers, or citation-backed research are mentioned.
AnastasiyaW/codex-claude-code-config
Validate a proposed DeepSeek API integration before any key or project context is sent: check thinking-mode tool-call history, strict-schema assumptions, bounded output, and provider data boundaries.
Discover, search, and selectively restore Claude desktop app sessions hidden across multiple accountIds. Desktop Sessions Discovery is an agent skill from AnastasiyaW/codex-claude-code-config. Discover, search, and selectively restore Claude desktop app sessions hidden across multiple accountIds.
Desktop Sessions Discovery fits situations like: user mentions missing sessions after account switch; lost desktop sessions; where do my old sessions live; runs multiple Claude accounts on the same machine.
Run `npx skills add AnastasiyaW/codex-claude-code-config --skill desktop-sessions-discovery -a claude-code`. Or copy the skill folder (skills/operational/desktop-sessions-discovery in AnastasiyaW/codex-claude-code-config) into .claude/skills/desktop-sessions-discovery in your project. Claude Code loads it when a task matches its description.
Run `npx skills add AnastasiyaW/codex-claude-code-config --skill desktop-sessions-discovery -a codex`. Or copy the skill folder (skills/operational/desktop-sessions-discovery in AnastasiyaW/codex-claude-code-config) into .agents/skills/desktop-sessions-discovery in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add AnastasiyaW/codex-claude-code-config --skill desktop-sessions-discovery -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/desktop-sessions-discovery, .gemini/skills/desktop-sessions-discovery, .github/skills/desktop-sessions-discovery and .opencode/skills/desktop-sessions-discovery in your project.
Going by SKILL.md and its folder, Desktop Sessions Discovery needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.
SKILL.md names 2 domains. As links in the text: github.com and medium.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Desktop Sessions Discovery is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.4k tokens (SKILL.md is roughly 9.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Desktop Sessions Discovery: Restore Legacy Sessions (zai-org/ZCode, 7.7k stars), Session Compaction And Restore (mvschwarz/openrig, 6.8k stars), Context Restore (garrytan/gstack, 136k stars) and Session Handoff (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
AnastasiyaW (a GitHub user) maintains it in AnastasiyaW/codex-claude-code-config, which has 154 GitHub stars. The repository holds 50 skills in this directory. The repository was last updated on October 11, 2026.
Source: AnastasiyaW/codex-claude-code-config on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.