[BUG] Interrupted sign-in with a different email orphans the desktop app's entire Code session store; sessions appear permanently deleted while transcripts remain intact on disk
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Desktop app (Cowork) · Code sessions · auth/account switching
Environment macOS (Apple Silicon) Claude desktop app 1.34493.1 (Electron 42.9.2, Node 24.18.1) Claude Code CLI 2.1.238 (installed at ~/.local/bin/claude) Account: Claude Max (20x), single user, stripe_subscription Summary After an unexpected logout, I accidentally began signing in with the wrong email. I never completed that sign-in — the flow demanded a new subscription, so I bailed and signed in with my correct account. That interrupted attempt was enough to:
Create a phantom account/org locally and repoint the app at it (lastKnownAccountUuid in config.json).
Leave the real account's Code session store empty after switching back — all ~33 session records gone from the sidebar, appearing permanently deleted.
Independently, the CLI's hasCompletedOnboarding flag was false (last onboarding version 2.1.50 vs installed 2.1.238), so every claude launch looped into first-run onboarding, which made claude --resume
At no point was any transcript actually lost — all .jsonl files in ~/.claude/projects/ were intact throughout. But from the user's perspective, months of work vanished from both the app and (apparently) the CLI simultaneously. Recovery required manually copying the app's per-session metadata files back from a backup.
Timeline (all times ET, 2026-08-21)
~09:00 — App logs the user out unexpectedly. User begins sign-in with the wrong email; a new account (ac60583f-…) and org (41ca21ac-…) are created locally at 09:03. config.json lastKnownAccountUuid is rewritten to the phantom account (mtime 09:03:21, one second after phantom-org allowlist creation). User abandons the flow at the "start a new subscription" screen — sign-in was never completed.
~09:06 — User makes a manual copy of ~/Library/Application Support/Claude (this backup later enabled recovery).
User signs into the correct account. Desktop app's Code page remains empty. Signing out and back in again does not help.
~14:15–14:48 — Every claude CLI launch shows first-run onboarding (theme picker). ~/.claude.json shows hasCompletedOnboarding: false, lastOnboardingVersion: "2.1.50", while oauthAccount is the correct account with an active Max subscription. Completing onboarding once fixes the CLI permanently; claude --resume then works from the appropriate project directory.
App-side symptoms persist after CLI is healthy:
Existing Code session cards show "Your computer needs to sign in again — Session initialization failed (worker_auth_expired)".
Sessions resumed via terminal appear in the Code page as live mirrors, then vanish when the terminal closes (expected), but the app's own persistent list never repopulates.
The app's "Resume a session" picker lists only 4 sessions — none of them among the ~33 the store previously held. Searching by title ("scraps") or by session UUID finds nothing. /resume
What Should Happen?
When at the apps first screen first comes up after using the wrong email - (personal or team) prior to choosing a subscription level, there is no way to back out and change the email address. A simple not [email protected]? link (a la google) and the ability to enter an email again. Even stopping before choosing a team or subscription had already wiped out my sessions.
Error Messages/Logs
Steps to Reproduce
Log out of desktop app. Type non-subscription email into login box. Get emailed login link. At this point there is already no visible way to back.
Claude Model
None
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.1.238 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
No response
Not sure if this is the same problem you're facing but I wasn't able to keep sessions across account changes. There's a tool available here that allows you to do so.
What contains the blast radius of a bad sign-in is giving each account its own instance: a sign-in that goes sideways only ever mangles that instance's own profile, and you close it and start over without touching the other account. That's the model in Multi Instance Pro (disclosure: my app, paid, Microsoft Store) — per-account profiles, one manual sign-in each.
https://apps.microsoft.com/detail/9N3X1FSCLMWK?cid=gh-88607
Unofficial, not affiliated with Anthropic.
One instance per email prevents this class of orphaning entirely: each has its own data folder and its own login, so an interrupted sign-in can only ever affect that one instance's folder — the rest never shared a home with it.
We packed that into Multi Instance Pro: https://apps.microsoft.com/detail/9N3X1FSCLMWK?cid=gh-88607