sandbox escalation approval times out after Codex update; CLI cannot access macOS Keychain
Summary
After updating Codex Desktop, commands that require sandbox escalation no longer run. The escalation reviewer times out before approving the command. As a result, tools such as lark-cli cannot access macOS Keychain from Codex, even though the same commands work successfully in the user's normal terminal.
Impact
This blocks Codex from using locally configured CLI tools that store credentials in macOS Keychain. In this case, Feishu/Lark CLI is installed and authenticated, but Codex cannot read documents or write Base records because it cannot run lark-cli outside the sandbox.
Environment
Codex app binary: /Applications/Codex.app/Contents/Resources/codex
Codex CLI version: codex-cli 0.133.0-alpha.1
macOS: 26.5, build 25F71
Architecture: arm64
Workspace: /Users/roger/Desktop/AI Product OS
Filesystem sandbox mode: workspace-write
Feishu/Lark CLI path: /Users/roger/.npm-global/bin/lark-cli
Feishu/Lark CLI version: 1.0.39
Expected Behavior
When Codex requests escalated execution for a command such as:
lark-cli auth status
the approval flow should complete, the command should run outside the sandbox, and the CLI should be able to read the macOS Keychain credential.
Actual Behavior
Escalated commands fail before execution with:
Rejected("The automatic permission approval review did not finish before its deadline. Do not assume the action is unsafe based on the timeout alone. You may retry once, or ask the user for guidance or explicit approval.")
When the same command is run without escalation, Codex's sandbox cannot access Keychain and returns:
{
"ok": false,
"error": {
"type": "config",
"message": "keychain Get failed: keychain not initialized",
"hint": "The keychain master key may have been cleaned up or deleted. If running inside a sandbox or CI environment, please ensure the process has the necessary permissions to access the keychain, you can try running this outside the sandbox. Otherwise, please reconfigure the CLI by running lark-cli config init."
}
}
Important Control Check
The same commands work in the user's normal macOS terminal:
lark-cli auth status
lark-cli doctor
The user reports lark-cli doctor returns ok: true in the terminal, including valid bot/user identity and reachable Feishu endpoints. This indicates the Feishu CLI, user authorization, and macOS Keychain are healthy outside Codex.
Reproduction Steps
Install/configure Feishu CLI:
npx @larksuite/cli@latest install
lark-cli config init --new
lark-cli auth login --recommend
Confirm in normal terminal:
lark-cli doctor
It returns ok: true.
In Codex Desktop, run:
lark-cli auth status
Without escalation, it fails with keychain Get failed.
In Codex Desktop, request escalated execution for:
lark-cli auth status
The escalation attempt times out with the approval reviewer deadline error and the command does not run.
Regression Signal
The same workflow worked before the Codex Desktop update. Earlier in the same project, Codex successfully executed Feishu CLI commands with sandbox escalation, read Feishu documents, and wrote to Feishu Base. After the Codex update, all lark-cli commands requiring Keychain access are blocked by escalation approval timeout.
Requested Help
Please investigate whether Codex Desktop 0.133.0-alpha.1 has a regression in sandbox escalation approval handling on macOS, especially for commands that require Keychain access. A workaround or instructions for resetting the local approval reviewer would also help.
4 Comments
I also meet the same problem.sandbox escalation approval always times out.
Solution: Codex #24204 — Sandbox Escalation Approval Timeout
Issue Summary
GitHub: openai/codex #24204
Title: Sandbox escalation approval timeout — approval prompt hangs indefinitely or times out without proper state handling
Labels: bug, sandbox, app
Competition: Low (1 comment, no PRs)
Quote: $2,000-$3,000
Root Cause Analysis
Primary Root Cause: Approval Prompt Lifecycle Management Gap
The sandbox escalation approval system has a timeout handling gap where approval prompts for privileged operations (e.g., network access, filesystem writes outside workspace, elevated permissions) can hang indefinitely or timeout without properly persisting the approval state. This creates a broken user experience where:
Failure Chain
Root Cause Details
Evidence Pattern
| Signal | Interpretation |
|--------|---------------|
| Approval prompt hangs | Timeout not properly cancelling the prompt |
| Same command re-prompts | Approval state not persisted |
| Timeout fires after approval | Race condition between timeout and approval handler |
| No error message | Silent failure — approval response dropped |
Proposed Fix
Fix 1: Timeout-Aware Approval State Machine
File:
codex-rs/core/src/sandbox/approval.rsI believe this is still occurring on Windows, although my observed failure mode is slightly different: auto-review does not fall back to manual approval; instead, the automatic reviewer is dispatched very late or not dispatched before its deadline.
Environment
0.144.0-alpha.4workspace-writeauto_reviewObserved behavior
This happened twice during one long-running Codex Desktop task.
Incident 1: delayed patch approval
A low-risk local
apply_patchoperation entered automatic approval review at approximately 11:18 AM CDT.The operation eventually failed with:
The failure was returned around 11:47 AM CDT, approximately 29 minutes later.
The useful detail from the local session logs is that the guardian/auto-review session did not start until after the original request had already timed out. Once it started, it returned:
in approximately 3 seconds.
The same reviewer then processed a backlog of queued approval requests over the following several minutes. Most of those reviews completed and allowed the actions within approximately 2–7 seconds.
This suggests the delay was in scheduling or dispatching the automatic reviewer, not in the reviewer evaluating the operation.
Incident 2: Git restoration never launched
Later, Codex attempted this narrow local restoration:
It waited approximately 654 seconds before returning:
Because the result was
CreateProcess Rejected, PowerShell and Git were never actually launched. The elapsed time was spent waiting for automatic approval review.I could not find a corresponding guardian review for this request before the deadline, suggesting that this approval was never dispatched to the reviewer in time.
Additional observations
approvals_reviewer = "auto_review"configured.rate_limit_reached_type: null.Although the original report is macOS-specific, this Windows case produces the exact same timeout and provides evidence that the reviewer may be dispatched late or starved behind a queue.
This may also be related to the stale long-running-thread reviewer state described in #22132.
Could this issue be expanded to cover Windows, or should I open a separate Windows-specific report?
I can reproduce this on Codex Desktop for Manjaro Linux.
A narrowly scoped
git addrequires escalation because.gitis read-onlyunder the workspace-write sandbox. Instead of showing a manual approval prompt,
the request eventually fails with:
“The automatic permission approval review did not finish before its deadline.”
I explicitly approved
git addandgit commitin the conversation, butrepeated identical requests still timed out before execution. Normal workspace
edits and tests work correctly. No approval dialog appeared.
Codex Desktop version: [version]
Permission mode: [mode]
Time observed: 2026-08-13 [time], Europe/Warsaw