Claude Desktop shows an empty Code sidebar after you switch accounts. This moves the session history to the account you are using. macOS, menubar or CLI.
12
stars
56
commits
JavaScript
primary language
Sep 8, 2026
updated

Claude Desktop lists each Claude Code session under the account and organization that created it. Switch accounts and the history stays behind.
--cloud reconciles Remote Control for the signed-in source. No model runs, no artifact is recreated.undo reverses the whole move.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
From this repo instead of npm: npx github:vitaliyhayda/claude-transplant (append a tag or commit hash to pin).
menubar after upgrading.menubar --snapshot panel.png renders the live panel, menubar --remove uninstalls, --demo <dir> renders the animation above.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, refused if a target changed or a source cannot be restored |
finish | finish held local records, check the active pending cloud source, or continue a staged cloud undo |
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 held work and pending cloud checks without reversing 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 plan printed by the prior move, finish, or restart call |
--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 |
Accounts are labeled from ~/.claude.json, its backups, ~/.claude* profile 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.
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):
claude.ai session. Cookies are decrypted in memory via Keychain, sent only to claude.ai, never stored.Safety:
drift/<receipt>. Other Desktop bookkeeping stays quiet. Missing or unreadable records retain a warning. Undo, retirement, and source archival also ignore branch and PR bookkeeping.forkedFrom pointers to their roots. Duplicate message ids that differ only in runtime metadata count as sync replays, anything else is refused.~/Library/Application Support/claude-transplant/cache.json. Every write decision uses live files. Delete it any time.--cloud, with no credential persistence.| 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 |
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.
56 commits
JavaScript
88.3%
Swift
11.7%
Claude Desktop shows an empty Code sidebar after you switch accounts. This moves the session history to the account you are using. macOS, menubar or CLI.
12
stars
56
commits
JavaScript
primary language
Sep 8, 2026
updated

Claude Desktop lists each Claude Code session under the account and organization that created it. Switch accounts and the history stays behind.
--cloud reconciles Remote Control for the signed-in source. No model runs, no artifact is recreated.undo reverses the whole move.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
From this repo instead of npm: npx github:vitaliyhayda/claude-transplant (append a tag or commit hash to pin).
menubar after upgrading.menubar --snapshot panel.png renders the live panel, menubar --remove uninstalls, --demo <dir> renders the animation above.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, refused if a target changed or a source cannot be restored |
finish | finish held local records, check the active pending cloud source, or continue a staged cloud undo |
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 held work and pending cloud checks without reversing 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 plan printed by the prior move, finish, or restart call |
--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 |
Accounts are labeled from ~/.claude.json, its backups, ~/.claude* profile 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.
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):
claude.ai session. Cookies are decrypted in memory via Keychain, sent only to claude.ai, never stored.Safety:
drift/<receipt>. Other Desktop bookkeeping stays quiet. Missing or unreadable records retain a warning. Undo, retirement, and source archival also ignore branch and PR bookkeeping.forkedFrom pointers to their roots. Duplicate message ids that differ only in runtime metadata count as sync replays, anything else is refused.~/Library/Application Support/claude-transplant/cache.json. Every write decision uses live files. Delete it any time.--cloud, with no credential persistence.| 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 |
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.
56 commits
JavaScript
88.3%
Swift
11.7%