mirror of
https://github.com/openai/codex.git
synced 2026-10-18 17:18:52 +00:00
## Why Transient admission errors or connection resets can prevent a code-mode session from opening before any execution starts. ## What changed - Retry `OpenSession` and the initial lease message on `Unavailable` or `ResourceExhausted`, with at most three attempts and 100 ms and 200 ms delays within a single startup deadline. - Classify HTTP connection and request failures as `Unavailable` so admission can recover from connection resets, while preserving error sources. - Keep retries limited to initial admission so established executions are never replayed. ## Testing Add gRPC integration tests covering transient status recovery, the retry limit, immediate failure for non-retryable statuses, and successful session execution after a connection reset. GitOrigin-RevId: 3b654bcd377a5addf7c3ed58bb1c72a449b2f7f7