fix(proxy): recover anchored bridge requests after missing response.created - #1736
Open
kevinsslin wants to merge 2 commits into
Open
fix(proxy): recover anchored bridge requests after missing response.created#1736kevinsslin wants to merge 2 commits into
kevinsslin wants to merge 2 commits into
Conversation
kevinsslin
added a commit
to kevinsslin/codex-lb
that referenced
this pull request
Aug 14, 2026
Integrates the reviewed transport reliability fixes from upstream PRs Soju06#1723, Soju06#1726, and Soju06#1736 into the production fork main after combined local validation.
kevinsslin
marked this pull request as ready for review
August 14, 2026 08:59
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1858d95b5b
ℹ️ 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".
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
response.createbut never emitsresponse.created;previous_response_idanchor once, before any response/model/downstream output exists;replay_count, and bypass retry-circuit cooldown only for the narrowly proven eventless same-anchor attempt.Fixes #1735
Related: #1393, #1394, #1711, #1723.
Why
Stable 1.23.0 still leaves an anchored continuation at the eventless watchdog boundary:
The existing generic replay guard correctly rejects ambiguous anchored replays, but it also rejected this narrower state where no upstream response event, model output, or downstream-visible output exists. The request then terminally 502s and the Codex client spends its reconnect budget / pauses the task.
Safety boundary
The new path is opt-in only from the missing-
response.createdwatchdog and requires:previous_response_idand no assigned response ID;response.createdwith zero response events;A replacement socket that is also silent is terminally retired; recovery is not indefinite. Durable operation fencing, account ownership, admission, API-key reservations, and direct WebSocket behavior are unchanged.
OpenSpec
openspec/changes/recover-precreated-anchored-bridge/Validation
uv run pytest -q tests/integration/test_http_responses_bridge.py— 129 passeduv run pytest -q tests/unit/test_proxy_http_bridge.py— 551 passeduv run ruff check app tests— passeduv run ruff format --check app tests— passeduv run ty check— passeduv run python scripts/check_proxy_architecture.py— passednpx --yes @fission-ai/openspec@1.9.0 validate recover-precreated-anchored-bridge --strict— validnpx --yes @fission-ai/openspec@1.9.0 validate --specs— 57 passed, 0 failedgit diff --check— passedNo database, environment, public API, or dependency changes. This PR is committed at
1858d95band pushed, but it is not merged, deployed, or live-verified yet.