fix(proxy): recover stale responses bridge sessions - #4
Conversation
Prevent already-closed WebSocket send races, expose accurate retry cooldowns, and quarantine rejected proxy-injected response anchors until a complete client resend can recover without context loss. Source sidechat: 019fda58-2804-71b0-aacb-8f150d8b03a7 Recovered from: 2160aea
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 09f28240f9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Source sidechat: 019fda58-2804-71b0-aacb-8f150d8b03a7 Recovered from: 09f2824
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 820e0be117
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Source sidechat: 019fda58-2804-71b0-aacb-8f150d8b03a7 Recovered from: 820e0be
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bad747d854
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Source sidechat: 019fda58-2804-71b0-aacb-8f150d8b03a7 Recovered from: bad747d
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9cd8de6efd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Source sidechat: 019fda58-2804-71b0-aacb-8f150d8b03a7 Recovered from: 9cd8de6
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4572486843
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Keep uploaded-file recovery pinned to the owning account and restore durable recovery aliases when replacement setup fails before the send primitive is reached. Source sidechat: 019fda58-2804-71b0-aacb-8f150d8b03a7 Recovered from: 4572486
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 11b6a83610
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Keep the clean-close integration contract on the instance registered by the application lifespan so durable retirement timing cannot manufacture an unrelated foreign-owner mismatch. Source sidechat: 019fda58-2804-71b0-aacb-8f150d8b03a7 Recovered from: 11b6a83
|
CI exposed a deterministic test-harness identity race rather than a product assertion failure: the clean-close reconnect test registered the app lifespan with the runtime instance, then patched request handling to synthetic @codex review |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Source sidechat: 019fda58-2804-71b0-aacb-8f150d8b03a7 Recovered from: 0d88bb3
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e86918fda7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Source sidechat: 019fda58-2804-71b0-aacb-8f150d8b03a7 Recovered from: e86918f
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d81ba12013
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Source sidechat: 019fda58-2804-71b0-aacb-8f150d8b03a7 Recovered from: d81ba12
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ff6f3a2a1d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Source sidechat: 019fda58-2804-71b0-aacb-8f150d8b03a7 Recovered from: ff6f3a2
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cdb2f1e614
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Source sidechat: 019fda58-2804-71b0-aacb-8f150d8b03a7 Recovered from: cdb2f1e
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3de58f3df8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Source sidechat: 019fda58-2804-71b0-aacb-8f150d8b03a7 Recovered from: 3de58f3
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Production reliability hotfix is fully green (27 successful checks, 0 failures), exact-head Codex review is clean, and all review threads are resolved. Requesting the required independent write-access approval for merge; deployment remains held until this repository rule is satisfied. |
Summary
Fix the production Responses bridge failure loop where an hour-old WebSocket closes, a proxy-injected previous response anchor is rejected on the replacement socket, and client retries exhaust themselves inside the durable cooldown. The change recovers only across proved pre-dispatch boundaries and never silently drops conversation context.
Type of change
Linked issue: repository issues are disabled; production incident request IDs 36864672-0305-4b82-a4e1-ef43054cb83a and 0008e69f-3547-4242-8ca5-32babfc3bedf.
OpenSpec
Change directory: openspec/changes/recover-repeated-clean-close/
Changes
Simplicity
Test plan
Screenshots / output
Before: the desktop reported Invalid previous_response_id and then HTTP 503 cooling down after repeated upstream timeouts.
After regression: the first unproved stale-anchor request returns previous_response_anchor_unrecoverable without a duplicate upstream dispatch; a subsequent complete resend opens one fresh bridge without the rejected anchor and completes.
Checklist