Skip to content

Treat workspace access denials as terminal errors - #60480

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/e601a22a0fa783a4ce5401a98ff9c8d3d9d1b074
Nov 10, 2026
Merged

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

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Treat workspace access denials as terminal errors

Why

A 403 with codex_workspace_access_denied indicates that the account cannot use Codex in the selected workspace. Retrying or falling back to HTTP does not resolve that denial.

What changed

Map codex_workspace_access_denied and invalid_workspace_selected responses to a shared workspace access denial error, and rename the error variant to reflect its broader scope. Keep workspace denials excluded from compaction model fallback.

Testing

Extend API error mapping tests to cover the new code on 403 and preserve ordinary handling for 503. Add WebSocket coverage verifying that an explicit workspace access denial does not trigger HTTP fallback.

## Why

A `403` with `codex_workspace_access_denied` indicates that the account cannot use Codex in the selected workspace. Retrying or falling back to HTTP does not resolve that denial.

## What changed

Map `codex_workspace_access_denied` and `invalid_workspace_selected` responses to a shared workspace access denial error, and rename the error variant to reflect its broader scope. Keep workspace denials excluded from compaction model fallback.

## Testing

Extend API error mapping tests to cover the new code on `403` and preserve ordinary handling for `503`. Add WebSocket coverage verifying that an explicit workspace access denial does not trigger HTTP fallback.

GitOrigin-RevId: e601a22a0fa783a4ce5401a98ff9c8d3d9d1b074
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/e601a22a0fa783a4ce5401a98ff9c8d3d9d1b074 branch from 77a6767 to 4b345a8 Compare November 10, 2026 00:54
@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-10T00:54:54.611312Z 77a6767 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 4b345a8 into main Nov 10, 2026
8 of 23 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/e601a22a0fa783a4ce5401a98ff9c8d3d9d1b074 branch November 10, 2026 00:55
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 10, 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