You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(claude): keep saved chats resumable across account switches - #50095
An existing Claude chat should keep its history when you switch accounts. Make its saved transcript reachable in the selected account before resuming it.
What Changed
When Claude's launch finds the transcript in another known account home, it prepares a hard link in the selected home's project bucket and checks that the resume resolver can find it there. The source stays in place, so later appends remain visible through both names. Existing target files are never overwritten.
A saved transcript also resumes when the record has no stored leaf yet, matching the existing behavior when that transcript is already in the selected home. A failed link or read-back keeps the existing pre-spawn refusal.
Why
Claude currently detects readable history in another home and refuses to start. Codex already prepares its rollout for the selected account during launch through moveCodexThreadIntoAccountHome. This gives Claude the corresponding transcript preparation.
N/A: this changes filesystem preparation before provider launch, without UI files or controls. The regression uses real transcript directories to show the resume check refusing before the change and succeeding after it.
Testing
Real-filesystem tests cover launch under a second account with and without a saved leaf, append continuity, repeated preparation, and refusal to replace a symlink.
With the materializer present but the launch change reverted on v1.4.278, both launch cases fail: one throws historyInOtherAccount, and the leafless case returns false. Both filesystem-only cases still pass, isolating the missing launch step.
All four cases pass with the change. The change was then applied to current main without the release branch's unrelated commits.
Linux build-server validation on Node 24.22.3: all 26 pnpm check:changed checks pass, including format, lint, all selected typechecks, affected tests and the selected ratchets.
Manually tested the full app on each platform
Automated tests exercise the persistence behavior with real files
Reverting the source change breaks the added behavior
Performance
A launch whose selected home lacks the transcript probes known Claude homes. A match adds one hard link and a resolver read-back. The code reads no transcript contents, copies no account folders, and adds no polling.
Risk
Level: Medium. A selected account gains a link to saved chat history. The move uses real project folders and regular transcript files; a conflicting target or failed read-back refuses the launch. Hard links across volumes or on unsupported filesystems also refuse, preserving the source. There is no copy fallback for a potentially live transcript.
A revert stops preparing new links but leaves links already created in place. It removes no credentials or source history.
AI Disclosure
Prepared with Codex (GPT-6).
Review
The move runs on the execution host with that host's router and known homes. It uses Node path/filesystem APIs and changes only Claude's native launch path; other providers and account selection are unchanged. SSH/paired hosts keep their own homes. Linux is tested; macOS and Windows filesystem restrictions can still produce the existing refusal. No dependency, credential migration, UI setting, or background task is added.
Agent skill upstream boundary
This change copies no upstream skill-installer material.
Checklist
Small change for one resume failure
User behavior, mechanism, risk and performance described
Self-reviewed for source preservation, target conflicts and execution-host scope
Required changed-file checks run on the build server
Prepare a hard link into the selected account before resuming history found
in another known Claude home, and verify the resolver can read it back.
Preserve the source and refuse conflicting or unsupported targets.
Real filesystem coverage includes saved and leafless launches, append
continuity, repeated preparation and symlink refusal. Reverting the launch
change reproduces two failures on v1.4.278; all four cases pass with it.
All 26 check:changed checks pass on Linux with Node 24.22.3.
Fixesstablyai#50093
When Claude launch finds a transcript in another account home, it attempts to move the transcript into the selected home and checks whether it resolves there. The move creates a hard link and rejects conflicting targets that do not identify the same regular file. Tests cover resume outcomes, inode preservation, later appends, repeated moves, and a conflicting symlink.
Severity of issue fixed: Medium
Merge Risk: Low · up to 2f99c
Resuming Claude chats across account switches now links the transcript into the selected account home. In a rare filesystem race on platforms with very large inode numbers, a different file could be treated as the same transcript, so later messages might not carry over. A small fix using exact inode comparison closes this, and the risk is low.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: Claude saved chats stay resumable when the user switches accounts. It matches the summarized launch-time transcript move into the selected account home and the linked …
Description check
The description follows the template. It includes ELI5, What Changed, Why, a linked issue (Fixes #50093), Visual Proof marked N/A with a reason, Testing with checkboxes, Performance with a 'None, beca…
Linked Issues check
Issue #50093 has one direct coding requirement set. (1) Resume an existing Claude chat under the selected account after making its transcript reachable there. The change in src/main/claude/structured/…
Out of Scope Changes check
All changed files relate to the linked requirement. The changes are in the Claude launch-home path (claude-structured-launch-home.ts), a new transcript move module (claude-session-account-move.ts), an…
Full details: Title check
Explanation
The title names the main change: Claude saved chats stay resumable when the user switches accounts. It matches the summarized launch-time transcript move into the selected account home and the linked issue #50093. The 'fix(claude)' prefix is a conventional commit style and is clear to a reviewer scanning history.
Full details: Description check
Explanation
The description follows the template. It includes ELI5, What Changed, Why, a linked issue (Fixes #50093), Visual Proof marked N/A with a reason, Testing with checkboxes, Performance with a 'None, because' style answer, Risk with a level, AI Disclosure, Review, the agent skill boundary, and a checklist. It describes the before and after behavior, the mechanism, the risk, and the revert path. Some template items are left unchecked, including manual testing on each platform and full CI, but the author states these as open. The Performance line is written as an explanation rather than a one-line 'None, because' answer, which is acceptable. The Notes section of the template was dropped, but the Review section covers the cross-platform and SSH scope.
Full details: Linked Issues check
Explanation
Issue #50093 has one direct coding requirement set. (1) Resume an existing Claude chat under the selected account after making its transcript reachable there. The change in src/main/claude/structured/launch/claude-structured-launch-home.ts calls the new moveClaudeSessionIntoAccountHome before the resume check. After a successful move, claudeLaunchResumesTranscript returns true. (2) Keep the source history. moveClaudeSessionIntoAccountHome uses a hard link under the existing filename, so the source stays in place and later appends remain visible through both names. (3) Refuse the launch if preparation cannot be verified. Link failures and a missing transcript after the move throw historyInOtherAccount through AgentSessionPreSpawnError. (4) Never overwrite an existing target. An existing destination is accepted only when it is a regular file with the same device and inode as the source. Otherwise the function throws, and the symlink case is covered by a test. (5) Leafless records resume, matching the existing same-home behavior. Automated tests in src/main/claude/transcripts/claude-session-account-move.test.ts use real directories and cover saved and leafless launches, inode and append continuity, and conflicting symlink refusal. The author reports that reverting the launch change makes the launch cases fail. Assessment is based on the whole-PR summary and the stated behavior; I did not inspect the full source diff.
Full details: Out of Scope Changes check
Explanation
All changed files relate to the linked requirement. The changes are in the Claude launch-home path (claude-structured-launch-home.ts), a new transcript move module (claude-session-account-move.ts), and its tests (claude-session-account-move.test.ts). The PR description states that other providers, account selection, UI, dependencies, and credential handling are unchanged. The PR description also states that no upstream skill-installer material is copied. The Codex reference is analogy only and does not add Codex changes. No unrelated change was identified in the summary.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Use BigInt filesystem metadata when a target appears during link preparation, preserving exact device and inode identity above the safe integer range. All 26 changed-file checks pass on Node24 build-server run Claude-Resume-Review-20261126T200241Z-77bc23.
Co-Authored-By: Codex <[email protected]>
Closing in favor of #36649, whose Claude carry and native next-send account following cover this failure. I offered our four real-filesystem cases, resolver read-back and exact-inode safety change there so upstream can keep one history-move implementation.
CodeRabbit's BigInt dev/ino point is fixed in fee7d458d2cc9551c567fa6bb0c49251db2d3ea9 and answered in its thread. The final head passed all26 pnpm check:changed checks on the Linux build server with Node24.22.3. The branch remains available for the author to take the commits or adapt the tests; closing this PR does not withdraw that offer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
An existing Claude chat should keep its history when you switch accounts. Make its saved transcript reachable in the selected account before resuming it.
What Changed
When Claude's launch finds the transcript in another known account home, it prepares a hard link in the selected home's project bucket and checks that the resume resolver can find it there. The source stays in place, so later appends remain visible through both names. Existing target files are never overwritten.
A saved transcript also resumes when the record has no stored leaf yet, matching the existing behavior when that transcript is already in the selected home. A failed link or read-back keeps the existing pre-spawn refusal.
Why
Claude currently detects readable history in another home and refuses to start. Codex already prepares its rollout for the selected account during launch through
moveCodexThreadIntoAccountHome. This gives Claude the corresponding transcript preparation.Linked Issue
Fixes #50093
Visual Proof
N/A: this changes filesystem preparation before provider launch, without UI files or controls. The regression uses real transcript directories to show the resume check refusing before the change and succeeding after it.
Testing
Real-filesystem tests cover launch under a second account with and without a saved leaf, append continuity, repeated preparation, and refusal to replace a symlink.
With the materializer present but the launch change reverted on v1.4.278, both launch cases fail: one throws
historyInOtherAccount, and the leafless case returns false. Both filesystem-only cases still pass, isolating the missing launch step.All four cases pass with the change. The change was then applied to current main without the release branch's unrelated commits.
Linux build-server validation on Node 24.22.3: all 26
pnpm check:changedchecks pass, including format, lint, all selected typechecks, affected tests and the selected ratchets.Manually tested the full app on each platform
Automated tests exercise the persistence behavior with real files
Reverting the source change breaks the added behavior
Performance
A launch whose selected home lacks the transcript probes known Claude homes. A match adds one hard link and a resolver read-back. The code reads no transcript contents, copies no account folders, and adds no polling.
Risk
Level: Medium. A selected account gains a link to saved chat history. The move uses real project folders and regular transcript files; a conflicting target or failed read-back refuses the launch. Hard links across volumes or on unsupported filesystems also refuse, preserving the source. There is no copy fallback for a potentially live transcript.
A revert stops preparing new links but leaves links already created in place. It removes no credentials or source history.
AI Disclosure
Prepared with Codex (GPT-6).
Review
The move runs on the execution host with that host's router and known homes. It uses Node path/filesystem APIs and changes only Claude's native launch path; other providers and account selection are unchanged. SSH/paired hosts keep their own homes. Linux is tested; macOS and Windows filesystem restrictions can still produce the existing refusal. No dependency, credential migration, UI setting, or background task is added.
Agent skill upstream boundary
Checklist