Repository navigation
fix(sessions): resume lands on a usable account and finds its conversation (v0.469.3) - #897
Merged
Merged
Conversation
…ation (v0.469.3) Re-adding a runtime account moved its old credential dir aside to `<name>.orphan-<ts>`, stranding every transcript made under it, and every resume stayed pinned to the dead account. Sessions came back as "Not logged in · Please run /login" or as a blank conversation under their own id. - archived credential dirs are transcript roots - every RESUME=1 launch calls POST /api/resume-prepare before the credential pre-flight: it moves the resume off an account that can no longer sign in, then stages the transcript into the dir it will run under - a .credentials.json holding no access/refresh token (only mcpOAuth) now reads as dead instead of healthy Pinned by scripts/resume-transcript-stage-test.cjs (in test:governance). 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.
Problem (instawp, 2026-11-10)
An expired runtime account (
vikas) was re-added under the same name. Every session that had run on it broke on resume:vikas.orphan-<ts>, taking the transcripts with it. Nothing searched that dir, soclaude --resumefound nothing and the launcher fell back to--session-id, which re-seeded the original prompt. A 4-day, 102-turn session re-opened empty.CLAUDE_CONFIG_DIR=…/vikaseven thoughvikashad left the pool. Two healthy accounts sat idle meanwhile..credentials.jsonheld onlymcpOAuth. With no expiry field it read as healthy.Fix
refreshTranscriptRootsalso registersruntime-accounts/<runtime>/*.orphan-*.POST /api/resume-prepare(session-secret loopback, fails open), called byclaude-launch.shon everyRESUME=1before the credential pre-flight:repinResumeAccount: if the pinned dir has no pool owner, its account is disabled, or it holds no usable login, pick a usable oauth account, rewrite the launch env and the row, and auditruntime.account.rotatedwithreason: resume: …. The launcher exports the returned dir.stageResumeTranscript: copy the newest transcript into the target dir when it's missing there. It never overwrites a copy in place, and it writes only into a pool dir or the box default. Auditssession.transcript.staged/session.transcript.missing.isDeadCredential: a record with neither an access nor a refresh token is dead (expiresAt: 0).Verification
scripts/resume-transcript-stage-test.cjs: 29 checks, added totest:governance.npm run test:governancegreen, plus typecheck and both bundles built.🤖 Generated with Claude Code