Skip to content

[codex] Reject read-only fallback with approvals disabled#23774

Merged
viyatb-oai merged 3 commits into
mainfrom
codex/viyatb/reject-readonly-never-fallback
May 21, 2026
Merged

[codex] Reject read-only fallback with approvals disabled#23774
viyatb-oai merged 3 commits into
mainfrom
codex/viyatb/reject-readonly-never-fallback

Conversation

@viyatb-oai
Copy link
Copy Markdown
Collaborator

@viyatb-oai viyatb-oai commented May 20, 2026

Why

If a user configures approval_policy = "never" with sandbox_mode = "danger-full-access", managed requirements can reject full access and force the existing permission fallback to read-only. That leaves Codex in a dead-end session: writes are blocked by the sandbox, while approvals are disabled so the session cannot ask to proceed.

This PR rejects that constrained configuration during startup instead of letting the TUI enter a read-only session that cannot make progress. The rejection is attached to the requirement-constrained permission path in Config.

What changed

  • Reject the danger-full-access to read-only managed-requirements fallback when the effective approval policy is never.
  • Explain in the startup config error why the fallback is invalid and how to fix it.
  • Add a regression test for the managed requirements path.

Co-authored-by: Codex noreply@openai.com
Co-authored-by: Codex noreply@openai.com
@viyatb-oai viyatb-oai marked this pull request as ready for review May 20, 2026 23:09
@viyatb-oai viyatb-oai requested a review from a team as a code owner May 20, 2026 23:09
Copy link
Copy Markdown
Contributor

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

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: f24c47bbae

ℹ️ 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/core/src/config/mod.rs Outdated
Co-authored-by: Codex noreply@openai.com
@viyatb-oai viyatb-oai merged commit a27d384 into main May 21, 2026
31 checks passed
@viyatb-oai viyatb-oai deleted the codex/viyatb/reject-readonly-never-fallback branch May 21, 2026 00:18
@github-actions github-actions Bot locked and limited conversation to collaborators May 21, 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.

2 participants