Skip to content

Back off registry retries during exec recovery#28546

Merged
jif-oai merged 3 commits into
mainfrom
jif/exec-recovery-registry-backoff
Jun 17, 2026
Merged

Back off registry retries during exec recovery#28546
jif-oai merged 3 commits into
mainfrom
jif/exec-recovery-registry-backoff

Conversation

@jif-oai

@jif-oai jif-oai commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Why

PR #28512 retries a failed session recovery every 100 ms. Every Noise recovery attempt first asks the environment registry for a fresh connection bundle, even when the eventual failure comes from the WebSocket or initialize handshake. During an outage, that could make each disconnected client call the registry about 250 times during the 25-second recovery window.

What changes

All retryable Noise recovery failures now use a separate backoff schedule:

base:    500 ms -> 1 s -> 2 s -> 4 s -> 5 s maximum
actual:  500-750 ms, 1-1.5 s, 2-3 s, 4-6 s, 5-7.5 s

The extra 0-50% is deterministic per-session jitter so disconnected clients do not retry together. Direct WebSocket recovery keeps the existing 100 ms retry because it does not re-enter the registry.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e0572cbf0d

ℹ️ 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".

Comment thread codex-rs/exec-server/src/remote.rs Outdated
@jif-oai jif-oai changed the title Back off registry retries during exec recovery [wip] Back off registry retries during exec recovery Jun 16, 2026
Base automatically changed from jif/automatic-exec-session-recovery to main June 17, 2026 08:20
@jif-oai
jif-oai force-pushed the jif/exec-recovery-registry-backoff branch from e0572cb to 13f0ecc Compare June 17, 2026 08:54
@jif-oai jif-oai changed the title [wip] Back off registry retries during exec recovery Back off registry retries during exec recovery Jun 17, 2026
@jif-oai

jif-oai commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b3083f3955

ℹ️ 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".

Comment thread codex-rs/exec-server/src/client_recovery.rs
@jif-oai
jif-oai merged commit a5229e0 into main Jun 17, 2026
31 checks passed
@jif-oai
jif-oai deleted the jif/exec-recovery-registry-backoff branch June 17, 2026 09:52
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant