claude-transplant

Move Claude Code history between accounts in Claude Desktop. Menubar or CLI.

npm version CI MIT license

claude-transplant menubar panel moving Claude Code sessions from a Team account and a personal account into one destination in Claude Desktop

Different accounts, the same conversations

Claude Desktop Code sidebar with three conversations under you@work.com, with Acme Inc. selected before Move
Work account before Move
you@work.com · Acme Inc.
The same three conversations under you@home.com, with Personal selected after moving Claude Desktop Code history between accounts
Personal account after Move
you@home.com · Personal
  1. Your work account shows your conversations in the Code sidebar.
  2. Sign into Personal and see an empty Code sidebar after switching accounts.
  3. Move the sessions from work to Personal, then reload that account in Desktop.
  4. Open a moved session and continue the same conversation.

Quick start

npx claude-transplant menubar

Open the panel from the menu bar, check the accounts to take from, pick the one to land in, click Move. Sign Claude Desktop into that account and the sessions are listed there.

What it does

Switch accounts in Claude Desktop and the Code sidebar goes empty. The session history is not lost. Desktop lists each Claude Code session under the account and organization that created it, so a personal plan, a Team seat, or a second Max subscription each sees only its own. This tool moves that history to the account you are using.

Where it fits next to the other tools people find for this problem:

Tool Layer Effect on the Desktop Code sidebar
claude-swap, claude-acc, CCSwitcher, clauth swap the CLI login none, Desktop keeps its own login and its own sidebar
CLAUDE_CONFIG_DIR separate CLI config directory none
restore-desktop-sessions copies record files into the active account sessions appear under both accounts and the copies drift apart
claude-code-session-restorer rebuilds record files from transcripts on Windows recovers a sidebar whose records were deleted
claude-transplant moves record files between accounts, verified, with undo history follows you, one account lists each session

Install

Node 22 or newer. The menubar also needs the Xcode command line tools: xcode-select --install

npx claude-transplant menubar   # install the menubar app
npx claude-transplant           # CLI
npm i -g claude-transplant      # global install, then claude-transplant

From this repo instead of npm: npx github:vitaliyhayda/claude-transplant (append a tag or commit hash to pin).

The CLI touches the network and Keychain only when you pass --cloud. The menubar's Move always passes it, reconciling Remote Control through Desktop's own claude.ai session, and stores nothing.

CLI

From  ↑↓ move · space select · enter next
  ❯ ◉ you@work.com · Acme Inc.    161 | 2h ago | acme-api | active
    ◉ you@work.com · Personal     157 | 1d ago | acme-api
    ○ you@home.com · Personal       3 | 5d ago | notes
    ○ you@work2.com · Northwind     12 | 4m ago | northwind

To    ↑↓ move · enter confirm
  ❯ ● you@home.com · Personal       3 | 5d ago | notes

  inventory   318 records | 3 already there | 307 to move
  move        308 ✓ | 307 zero-copy | 1 rescued
  verify      transcripts unchanged ✓ | sidecars unchanged ✓ | desktop ✓

  receipt     ~/Library/Application Support/claude-transplant/2026-09-02T16-04-11-208.json
  undo        npx claude-transplant undo
Command Effect
claude-transplant pick From and To, move, print a receipt
--dry-run plan only, write nothing
undo quarantine the last move and restore source entries and task registrations, refused if a target changed or a source cannot be restored
finish recover interrupted task transfers, finish held local records or active-source cloud checks, continue a staged undo, and list earlier refusals as information
sweep verify placed records and retry eligible pending work, never requests a restart
restart show the plan for the existing Desktop refresh action
keep-local cancel remaining work and cloud checks, keep completed moves
accounts list accounts
menubar install the menubar app (--snapshot <png>, --remove)
--from <match> --to <match> skip the picker, repeat --from, match on email, org name, or uuid prefix
--move-only move eligible records, leave Desktop-owned records held
--restart-approved <token> approve the exact restart plan printed for the requested operation
--cloud reconcile the active source, queue inaccessible sources that still have unreadable or unarchived local records
--json one event per line
--version print the version

What each command touches

Every command may write the tool's own files under ~/Library/Application Support/claude-transplant: cache, lock, restart plan, receipts, quarantine, and drift evidence. A move, finish, sweep, undo, and restart first finish any interrupted move, retirement, undo, or restart, which can move records, rewrite the receipt and quarantine, and reopen Claude Desktop. --dry-run and keep-local refuse in that state instead.

Command Beyond the tool's own folder
accounts, --dry-run, --version, keep-local nothing, --dry-run --cloud also reads Remote Control metadata over the network
restart without a token nothing beyond the recovery above
move, finish, sweep, undo Desktop session records and scheduled task registries under claude-code-sessions
--restart-approved <token> quits and reopens Claude Desktop around the requested operation
a move with --cloud, and finish, sweep, undo, or restart while the receipt has pending or staged cloud work Desktop's claude.ai session read from Keychain in memory, network to claude.ai only, Remote Control mirrors archived or restored there, rescued local transcripts when a remote branch diverged
menubar, menubar --remove the app bundle in the tool's folder and a LaunchAgent under ~/Library/LaunchAgents
Move in the menubar the same as a move with --cloud, the panel always passes it
menubar --snapshot <png> that image file

Command and flag names are stable. Renames get a deprecation release first.

FAQ

Why is the Code sidebar empty after switching accounts?

Desktop keeps one record per session under ~/Library/Application Support/Claude/claude-code-sessions/<account>/<organization> and lists only the signed-in folder. The transcripts in ~/.claude/projects are shared by every account and untouched.

My sessions disappeared after signing out, an update, or a reset. Is this the fix?

Only when the records still exist under another account or organization. If a reset or update deleted them there is nothing to move, the transcripts survive and claude --resume in the terminal still lists them, and the sidebar needs its records rebuilt.

Do I have to move history back when I return to the first account?

Yes, it is a move, not a copy. Moving back is the same one click and takes seconds to a minute, longer only when a Desktop restart is needed.

Can I continue the same session under the other account?

Yes. It keeps its id, and the next message goes through the account you are signed into with the whole conversation as context. Personal history moved into a Team or Enterprise organization becomes that organization's data.

Can a Team or Enterprise admin see moved history?

Team owners get usage analytics only. Enterprise compliance tooling can retrieve Claude Code session transcripts, and the next message in a moved session sends its whole conversation to that organization.

Does it work on Windows or Linux?

Not yet. Desktop uses the same per-account folder layout there, under its app data directory, so the CLI needs only the platform paths and process checks, and the menubar stays macOS. PRs welcome, and claude-code-session-restorer covers Windows rebuilds meanwhile.

Shorter answers:

Anthropic issues that describe the same problem: 74662 tracks the per-account scoping, 85294 the root cause, 26452 and 48511 the disappearing sessions, 18435 and 30031 the request for account profiles.

Discussed on Hacker News

Manual walkthrough: recovering missing Claude Desktop history

How it works

A session is three files: the transcript in ~/.claude/projects, the sidecar directory beside it, and the record under ~/Library/Application Support/Claude/claude-code-sessions/<account>/<organization>. The transcript pool is shared across accounts, so a move writes the same record into the target organization with the same cliSessionId, verifies that transcript, sidecars, and both records are unchanged, then parks the source record in quarantine.

Eligibility:

Worker identity uses the Desktop record id, CLI session id, PID, process start time, and ancestry, plus ~/.claude/sessions/<pid>.json for workers that omit the session id. External CLI workers are always refused because restarting Desktop does not stop them.

Restarts:

Remote Control (--cloud):

Safety:

Reading the output

Accounts are labeled from ~/.claude.json, its backups, ~/.claude* profile directories, ~/.claude-switch/accounts/* config directories, and Desktop's agent-mode records. Personal-plan organizations show as Personal. Accounts with no known email show a uuid prefix, session count, last activity, and most common project folder.

Active identity comes from the newest complete initialization entry in Claude Desktop's main.log for the current Desktop process. A logout, unfinished switch, initialization failure, or config conflict clears it and the panel shows unknown. No Keychain access or network request is used for the badge. Desktop must be running.

Rules
Not done, and why
Tried Result
Change ownership on the server No API reassigns a session
claude --fork-session Copies only the compacted chain and grows disk use
Copy an existing local transcript The pool is already shared, a duplicate is only disk
Delete the source Removes the rollback
Merge sidecars across versions Requires writing a new generation
Move a record while its Desktop worker runs Desktop rewrites the record from cache, title and turn count roll back
Infer a restart-safe moment from activity logs Cold records need no restart, held records get an explicit graceful shutdown
Repair changed records from old snapshots Would overwrite legitimate title, archive, and pin edits
Read the active org from Desktop's extensions allowlist timestamp Can point at the wrong org after a failed refresh
Trust the lastActiveOrg cookie for the active organization Stale after an in-Desktop switch, the log-derived identity wins and the cookie is a fallback

Limits

claude-transplant macOS Claude Desktop Claude Code Tested
4.0.6 27.0 1.52386.3 2.1.266 2026-09-12
4.0.5 27.0 1.49585.0 2.1.260 2026-09-08
4.0.4 27.0 1.46388.4 2.1.260 2026-09-08
4.0.3 27.0 1.46388.4 2.1.260 2026-09-07

Receipts, quarantine, drift evidence, cache, and the menubar app live in ~/Library/Application Support/claude-transplant. Delete quarantine once its receipts are no longer wanted. A kernel lock prevents overlapping runs. MIT.