Skip to content

Let codex retry a turn the overlay dropped - #199

Merged
vitramir merged 1 commit into
mainfrom
give-codex-a-retry-budget
Aug 29, 2026
Merged

vitramir merged 1 commit into
mainfrom
give-codex-a-retry-budget

Conversation

@vitramir

Copy link
Copy Markdown
Contributor

request_max_retries and stream_max_retries were both 0, set to "align runtime Codex provider config with E2E config" — a reason to make a test deterministic, not a reason for an agent in a cluster to give up on its first dropped connection.

Codex reaches the proxy over the overlay. A connection that served one turn may be gone by the next: the tunnel closes its circuit and the following request goes into it before anything notices. Observed on the local VM in TestMCPToolsE2E — codex completes its first turn, the MCP tool call reaches the sidecar, and the turn that should report the result dies immediately after:

codex bridge: error notification: will_retry=false
  message=stream disconnected before completion:
  error sending request for url (http://llm-proxy.agyn/v1/responses)
codex ended turn ... without a message

Two is small enough that a provider genuinely refusing is still reported rather than hammered.

A turn reaches the platform over the overlay, and a connection that
served one turn may be gone by the next: the tunnel closes its circuit
and the following request goes into it before anything notices. With no
retries at all that was fatal -- the tool call ran, and the turn that
should have reported what it found died on the way out with nothing
posted to the thread.

The zeros were set to match what the e2e config had, which is a reason
to make a test deterministic and not a reason for an agent in a cluster
to give up on its first dropped connection.
@vitramir
vitramir merged commit b32b373 into main Aug 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant