Error starting chat invalid turn context override: invalid value for `approval_policy`: `OnRequest` is not in the allowed set [UnlessTrusted] (set by cloud requirements)

Resolved 💬 4 comments Opened May 10, 2026 by rdukat Closed May 10, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of the Codex App are you using (From “About Codex” dialog)?

Version 26.506.31421 (2620)

What subscription do you have?

Enterprise (Oracle)

What platform is your computer?

Mac latest

What issue are you seeing?

Getting the below error for any request. works fine with my private account. have tried various cmd line options like '--ask-for-approval untrusted' and also for ChatGPT to help. doesn't work.

Error:
Error starting chat
invalid turn context override: invalid value for approval_policy: OnRequest is not in the allowed set [UnlessTrusted] (set by cloud requirements)

What steps can reproduce the bug?

Uploaded thread: 91054e69-149e-4eda-aa94-8e1be6170d9c

What is the expected behavior?

to run.

Additional information

_No response_

View original on GitHub ↗

4 Comments

github-actions[bot] contributor · 3 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #21837

Powered by Codex Action

etraut-openai contributor · 3 months ago

This means that you have tried to configure codex in a way that your corporate IT policy does not permit. Your managed policy apparently restricts approval_policy to UnlessTrusted. If you'd like to use OnRequest, talk to your IT team.

rdukat · 3 months ago

Unless my corp IT policy has decided that I cannot prompt ANYTHING, then that does not make sense. Happens even when prompting "hello" - nothing goes through. I do have permissions from my org.

rdukat · 3 months ago

Solved it, with the help of gemini-cli. Here's the explanation -

Root Cause

  • Codex desktop was storing local app state outside ~/.codex.
  • Deleting ~/.codex, reinstalling, logging out/in, and toggling permissions did not clear that

desktop state.

  • The failing state caused the desktop app to start chats with approval_policy: OnRequest.
  • Our org/cloud requirements only allow UnlessTrusted, so every prompt failed before the model

turn started.

Error

Error starting chat
invalid turn context override: invalid value for approval_policy: OnRequest is not in the
allowed set [UnlessTrusted] (set by cloud requirements)

Fix
Quit Codex, then reset the desktop app’s macOS app state:

pkill -x Codex

mv ~/Library/Application\ Support/Codex \
~/Library/Application\ Support/Codex.bak.$(date +%Y%m%d-%H%M%S)

mv ~/Library/Preferences/com.openai.codex.plist \
~/Library/Preferences/com.openai.codex.plist.bak.$(date +%Y%m%d-%H%M%S)

open -a Codex

After relaunch and login, chats started normally.

Support Note
This was not a company policy denial of Codex access. It was a Codex desktop client/local-state
issue where the app sent a disallowed approval policy for an org account whose cloud
requirement was UnlessTrusted.