Repository navigation
fix(sessions): an empty transcript copy no longer makes a session unresumable (v0.471.1) - #908
Merged
Merged
Conversation
…esumable (v0.471.1) A resume's credential dir can hold a copy of the conversation with no turns while the real one sits in another root (an archived `<name>.orphan-*` dir). Staging read the empty copy as "present" and copied nothing, so `claude --resume` said "No conversation found" and the `--session-id` fallback said "Session ID ... is already in use". The session could never be reopened. - transcriptHasTurns(): true / false / undefined (unreadable = may be real). - stageResumeTranscript: look past a KNOWN-empty copy; copy the real one first, then set the empty one aside (.empty-<ts>), restoring it if the swap fails. - findTranscript: rank copies with turns above empty ones; preferRoot still wins outright. - claude-launch.sh: the [r] key runs prepare_resume before resuming. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A resume's credential dir could hold a copy of the conversation with no turns while the real one sat in another root (an archived
<name>.orphan-*dir). Staging treated the empty copy aspresent, soclaude --resumeanswered "No conversation found" and the--session-idfallback answered "Session ID … is already in use" — the session could never reopen. The[r]key never ranprepare_resume, so it couldn't recover either.transcriptHasTurns()→ true / false / undefined (unreadable = may be real, never set aside).stageResumeTranscript: looks past a KNOWN-empty copy; copies the real one first, then renames the empty one to.empty-<ts>(never deleted), restoring on failure. Auditedsession.transcript.empty-replaced.findTranscript: ranks copies with turns above empty ones;preferRootstill wins outright.claude-launch.sh:[r]runsprepare_resumebefore resuming.Authored by the globex engineer agent (no push access); applied + verified here: typecheck, both bundles,
resume-transcript-stage-test45/45,npm run test:governanceexit 0.🤖 Generated with Claude Code