fix(proxy): recover tool-complete sessions from unavailable owners - #30
Merged
Merged
Conversation
Preserve canonical replay ownership checks and make unreplayable continuity errors actionable. Regression scenarios adapted from Soju06#2121 and extended for temporary rate limits, explicit anchors, unknown fields and repeated rejection.
maisi
changed the base branch from
chore/sync-upstream-beta5-fix-27
to
chore/sync-upstream-beta6
September 9, 2026 21:15
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
Fixes #27.
A rate/usage-limited owner currently strands a session when its full resend includes a complete tool-call/result batch followed by a new user instruction. The durable manifest proves the batch is complete, but the replay helper rejects the trailing user input and returns
previous_response_owner_unavailable.This permits that proven full replay on an eligible replacement, retains the complete calls/results/new input, and removes the old upstream anchor through the existing recovery path. Subsequent anchored requests remain on the replacement. Unsafe requests keep their continuity error code and now explain how to resend complete account-neutral history or start a new session.
Upstream integration PRs #29 and #31 are merged. This focused fix targets current main and is verified with beta6.
Safety and scope
No settings, migrations, dashboard changes or new defaults. Reuses the existing recovery path rather than introducing a second session mechanism.
OpenSpec:
openspec/changes/archive/2026-09-09-recover-unavailable-continuity-owner/.Related upstream work: Soju06#1707 and Soju06#2121. Public regression scenarios are adapted from Soju06#2121 and extended for rate limits, explicit anchors and repeated unsafe requests; the stricter trailing-input validation addresses its review concern.
Validation
/v1/responsesand/backend-api/codex/responseswith 502.OpenSpec is verified, synchronized and archived. Final GitHub checks must pass before merge.