Skip to content

Stop retrying terminal runtime authentication denials - #60096

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/33f6f707454130e97e13f3b53e29d2c484602152
Nov 7, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/33f6f707454130e97e13f3b53e29d2c484602152

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Stop retrying terminal runtime authentication denials

Why

Invalid assertions and paused or revoked runtime instances cannot recover through request retries or credential refresh. Permanent refresh-token failures also need to retain their sign-in error instead of becoming retryable stream errors.

What changed

  • Recognize terminal runtime denial codes in 401 and 403 response bodies and identity error headers, preserving HTTP diagnostics while stopping retries.
  • Skip credential recovery for runtime denials in runtime-enabled model providers and backend requests, while preserving recovery for ordinary credential expiration.
  • Propagate permanent refresh-token failures through runtime authentication as RefreshTokenFailed errors.

Testing

Add coverage for body and header denials, preserved HTTP diagnostics, provider-scoped credential recovery, and cached permanent refresh failures. Complete-turn tests verify that runtime denials stop without retries or refreshes while expired credentials recover in both runtime authentication modes.

## Why

Invalid assertions and paused or revoked runtime instances cannot recover through request retries or credential refresh. Permanent refresh-token failures also need to retain their sign-in error instead of becoming retryable stream errors.

## What changed

- Recognize terminal runtime denial codes in `401` and `403` response bodies and identity error headers, preserving HTTP diagnostics while stopping retries.
- Skip credential recovery for runtime denials in runtime-enabled model providers and backend requests, while preserving recovery for ordinary credential expiration.
- Propagate permanent refresh-token failures through runtime authentication as `RefreshTokenFailed` errors.

## Testing

Add coverage for body and header denials, preserved HTTP diagnostics, provider-scoped credential recovery, and cached permanent refresh failures. Complete-turn tests verify that runtime denials stop without retries or refreshes while expired credentials recover in both runtime authentication modes.

GitOrigin-RevId: 33f6f707454130e97e13f3b53e29d2c484602152
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/33f6f707454130e97e13f3b53e29d2c484602152 branch from 65ccf73 to efdacaf Compare November 7, 2026 09:48
@copyberry
copyberry Bot merged commit efdacaf into main Nov 7, 2026
1 check passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/33f6f707454130e97e13f3b53e29d2c484602152 branch November 7, 2026 09:49
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor
Codex Review Summary: 🔄 Running

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-11-07T09:49:01.317139Z 65ccf73 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot locked and limited conversation to collaborators Nov 7, 2026

This branch was previously deployed

1 inactive deployment
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants