Get back Claude Code sessions, sidebar folders, routines and published artifacts after switching Claude plan, account or workspace (e.g. Max to Team). Guide + agent skill.
Claude Code sessions, folders, routines and artifacts missing after switching ac
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
You switched your Claude plan, account or organization. Now the **Code** tab in the Claude desktop
app is empty, the app's import finds nothing, scheduled tasks stopped, old artifact links point to a
workspace you no longer see, and claude -p returns a 403. This guide shows how to get it all back,
step by step, with a small read-only toolkit and the manual commands behind it.
> Unofficial. Not affiliated with Anthropic. Tested on macOS with the Claude desktop app build
> 2.31226.x (bundled Claude Code 2.1.295) and Claude Code CLI 2.1.284. Last verified 2026-10-10.
> The app's on-disk format is private and can change in any release.
TL;DR
- **Your conversations are most likely still on your disk**, in ~/.claude/projects/. Only the
desktop app's per-workspace session list changed. One login with a personal and a Team workspace
has two separate Code sidebars.
- **To bring one session into the workspace you are looking at:** back up first
(Step 0), keep the desktop app open on that
workspace and run open "claude://resume?session= " (tested). The documented command
claude --desktop --resume (Claude Code 2.1.285+) opens the same link, but needs a
working CLI subscription login and was not tested across workspaces. Unlike the app's own import,
the link works even when another workspace already lists the session.
- **For many sessions:** python3 tools/ccrecover.py scan, then plan, then import (dry run
first). See Step-by-step recovery.
- **Sidebar folders, routines and connectors do not follow.** Recreate them. Published artifacts get
new URLs; their sources can be rebuilt from the transcripts.
- **Do not delete sessions in the old workspace.** Since Claude Code 2.1.284, deleting a session from
the sidebar also deletes its transcript (#98642).
- **How long you have:** transcripts of sessions started or last continued in Claude Desktop are kept
at any age (Claude Code 2.1.248+), unless an organization policy limits it. Terminal and claude -p
transcripts are deleted after 30 days by default. Raise cleanupPeriodDays now
(Before you switch).
- **Do not delete the old account while its login is also your Team seat.** Keep it at least until
sessions, routines and artifacts are recovered and links rewritten: the old workspace is the only
place the old session list and artifact URLs live. The official "Use your organization account only"
migration also closes the personal account and is one-way: choose it, if at all, only after
Step 0 and the recovery.
- **Transcripts and backups can contain secrets** (API keys, tokens, passwords, private messages,
file contents). Never post them, or this toolkit's output, in a public issue, gist or chat.
- **For AI agents:** review the skill file, then paste this into Claude Code or any coding agent:
Read https://raw.githubusercontent.com/schneidermilanistvan-hash/claude-code-account-switch-recovery/main/skills/workspace-switch-recovery/SKILL.md and follow it.
Symptoms
Each heading is the exact text you see, so search engines and agents can match it.
The Code tab sidebar is empty after switching to a Team workspace
The Code tab shows no history after you joined a Team or Enterprise organization, switched account,
or your Pro/Max plan lapsed. Others report the same after a plan lapse alone
(#72541). claude --resume in a terminal
still lists them (its picker starts with the current folder and can widen to all projects). The
sessions are listed in the *other* workspace's sidebar, not lost.
Go to Step 2.
No CLI sessions to import
The full dialog from **Help → Import Claude Code CLI Sessions…** (wording from the app bundle; the
in-app dialog may phrase it differently):
"Already in your session list" includes the session lists of **every** workspace on this computer.
The importer skips any session that any workspace has recorded, including archived ones and, per
the app's code, deleted ones.
It also skips Code-tab sessions that started after the app began keeping records. So after a
workspace switch it finds none of the sessions the old workspace lists, by design (at most a few that
no workspace recorded). Archiving the sessions in the old workspace does not
change that, and deleting them destroys their transcripts (see the TL;DR). Details: docs/02-sessions.md.
Your organization has disabled Claude subscription access for Claude Code · Use an Anthropic API key instead, or ask your admin to enable access
Headless runs (claude -p, the Agent SDK, scripts, cron or launchd jobs) fail with this 403. In -p