Repository navigation
Back off automatic remote control reconnects with jitter - #50348
Merged
copyberry[bot] merged 1 commit intoOct 2, 2026
Merged
copyberry[bot] merged 1 commit into
copyberry[bot] merged 1 commit into
Conversation
## Why Closed WebSocket connections previously triggered immediate reconnects, and successful handshakes reset backoff even when connections were short-lived. ## What changed - Delay automatic reconnects before token refresh or enrollment, and report `Connecting` while waiting. - Use exponential backoff with jitter between half and all of the delay, starting at 5 seconds and capped at 30 seconds. - Retain backoff across short-lived connections and reset it after a connection lasts at least 60 seconds. - Interrupt the reconnect delay on shutdown, auth owner invalidation, or enable/disable changes, including an immediate disable/enable pair. ## Testing Add connection tests for delayed token refresh, backoff retention and reset, explicit re-enabling, and prompt shutdown. Update retry tests to check jitter bounds, saturation during sustained failures, and backoff retention after a successful handshake. GitOrigin-RevId: 0b9055ff64ff7d96f2d974b73ced8d4ffd02ac9e
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/0b9055ff64ff7d96f2d974b73ced8d4ffd02ac9e
branch
from
October 2, 2026 16:06
e488a9c to
9d2b603
Compare
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/0b9055ff64ff7d96f2d974b73ced8d4ffd02ac9e
branch
October 2, 2026 16:06
pradeep-subramanian-pace
deployed
to
issue-triage
October 2, 2026 16:26 — with
GitHub Actions
Active
pradeep-subramanian-pace
deployed
to
issue-triage
October 2, 2026 16:26 — with
GitHub Actions
Active
pradeep-subramanian-pace
deployed
to
issue-triage
October 2, 2026 16:26 — with
GitHub Actions
Active
This branch was successfully deployed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Back off automatic remote control reconnects with jitter
Why
Closed WebSocket connections previously triggered immediate reconnects, and successful handshakes reset backoff even when connections were short-lived.
What changed
Connectingwhile waiting.Testing
Add connection tests for delayed token refresh, backoff retention and reset, explicit re-enabling, and prompt shutdown. Update retry tests to check jitter bounds, saturation during sustained failures, and backoff retention after a successful handshake.