Skip to content

Retry gateway credential exports after unauthorized responses - #59816

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/3397476dbfd3bec1bd44f90657c4f9e17bb7df67
Nov 6, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/3397476dbfd3bec1bd44f90657c4f9e17bb7df67

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Retry gateway credential exports after unauthorized responses

Why

Cached gateway command credentials need to be refreshed when the gateway rejects them with a 401.

What changed

Clear the cached credential_export token after an inference HTTP 401 or a WebSocket upgrade rejected with 401, then rerun the command for one retry. Preserve subsequent primary authentication recovery if the retry is also unauthorized, and document the behavior.

Testing

Add integration coverage for using a new exported token, reporting an invalid export, recovering primary authentication after the gateway retry, and stopping after a second unauthorized WebSocket upgrade.

## Why

Cached gateway command credentials need to be refreshed when the gateway rejects them with a `401`.

## What changed

Clear the cached `credential_export` token after an inference HTTP `401` or a WebSocket upgrade rejected with `401`, then rerun the command for one retry. Preserve subsequent primary authentication recovery if the retry is also unauthorized, and document the behavior.

## Testing

Add integration coverage for using a new exported token, reporting an invalid export, recovering primary authentication after the gateway retry, and stopping after a second unauthorized WebSocket upgrade.

GitOrigin-RevId: 3397476dbfd3bec1bd44f90657c4f9e17bb7df67
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/3397476dbfd3bec1bd44f90657c4f9e17bb7df67 branch from fe3d512 to 6eb51a4 Compare November 6, 2026 03:51
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-11-06T03:51:23.533556Z fe3d512 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.

@copyberry
copyberry Bot merged commit 6eb51a4 into main Nov 6, 2026
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/3397476dbfd3bec1bd44f90657c4f9e17bb7df67 branch November 6, 2026 03:51
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 6, 2026
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.

1 participant