fix(server): release compatible writers before cross-instance resume - #9211
Open
BranislavMateas wants to merge 1 commit into
Open
fix(server): release compatible writers before cross-instance resume#9211BranislavMateas wants to merge 1 commit into
BranislavMateas wants to merge 1 commit into
Conversation
Contributor
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a small, localized server bug fix that safely sequences compatible provider-session replacement while preserving continuation state. The new behavior is covered by a targeted regression test, with no schema, deployment, default, or sensitive-package changes. You can add or adjust custom eligibility rules. Learn more. |
4 tasks
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.
What Changed
When resuming a thread on another compatible Codex provider instance, T3 Code now:
Added a regression test covering account switching while the original session still owns the Codex thread.
Why
Codex allows only one active writer per thread. T3 Code previously started the replacement session before stopping the original one, causing an
already has an active writererror. A retry could then create a fresh Codex thread and lose the conversation context.Compatible provider instances share the same continuation identity, so releasing the previous writer before resuming is safe and keeps the thread intact.
Checklist
Note
Release compatible writers before cross-instance resume in
ProviderService.startSessionAllows a persisted session to resume on a different compatible provider instance by matching on driver kind and continuation identity rather than requiring identical instance IDs.
driverKindand continuation identity; a false positive could stop a live session on the wrong adapter.Macroscope summarized c7bc29b.