fix(claude-sdk-oauth): harden persisted restart checkpoints - #954
Closed
code-yeongyu wants to merge 1 commit into
Closed
fix(claude-sdk-oauth): harden persisted restart checkpoints#954code-yeongyu wants to merge 1 commit into
code-yeongyu wants to merge 1 commit into
Conversation
Persist only bounded, ledger-verified restart checkpoints and fail closed across malformed state, branch rewrites, compaction, forks, and tree navigation. Strengthen lifecycle coverage and the two-process restart probe so full-history replay cannot pass unnoticed.
Owner
Author
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.
Summary
Why
PR #943 fixed headless Claude SDK OAuth continuation across separate CLI processes. This follow-up hardens that persisted state against stale or malformed checkpoints, branch-history changes, unbounded session growth, and incorrect boundary reuse.
Validation
npm run checkpackages/coding-agentwith bounded parallelism:Relationship
Security and durability follow-up to #943 and issue #6981.
Summary by cubic
Hardened headless
claude-sdk-oauthrestart continuity by replacing unbounded persisted state with a bounded, ledger-verified checkpoint. Previously we restored from any latest binding array; now we restore only when a well‑formed checkpoint is immediately followed by its committed assistant and the branch prefix digest matches, otherwise we fail closed to avoid stale or cross‑branch resumes (issue #6981).{sdkSessionId, sentCount, sentPrefixHash, lastAssistantUuid, accountName, modelId, systemPromptHash, toolsetHash}; remove persisted sent-hash arrays and assistant maps.sentPrefixHashto reattach only the new turn; fallback to flatten with explicit reasons when verification fails.#6981.sentHashPrefixDigestinsession-sync.ts; checkpoint schema changed insession-binding.ts; wiring persists invalidations insession-registry-wiring.ts. No migration required for users.Written for commit 8f41e06. Summary will update on new commits.