Repository navigation
Description
What variant of Codex are you using?
Codex CLI and Codex Desktop / app-server approval flows.
Locally observed with:
codex-cli 0.139.0- Codex Desktop
26.611.62324on macOS
What feature would you like to see?
Please expose whether a PermissionRequest hook corresponds to an approval prompt that actually requires user attention, or add a separate post-routing hook/event for user-facing approval prompts.
A concrete version of the request would be one of:
- Add the effective approval reviewer to
PermissionRequestinput, e.g.approvals_reviewer: "user" | "auto_review" | "guardian_subagent". - Add a direct routing field, e.g.
approval_route: "user" | "auto_review", orrequires_user_input: true. - Add a separate post-routing event/hook such as
UserApprovalRequest/ApprovalPromptShownthat fires only when Codex is actually waiting on the user.
Why this matters
I have a PermissionRequest command hook in ~/.codex/hooks.json that invokes a local notification script. The script uses terminal-notifier on macOS to play a sound and show a notification like "Codex needs permission" with the requested tool name.
When approval reviewer is set to auto_review / "Approve for me", the hook still fires before Codex routes the approval through auto-review. The result is a false positive notification for requests that the automated reviewer can handle without human input.
From the user's perspective, the notification says Codex needs permission, but no user action is actually needed.
The current hook payload does not appear to provide a reliable way to suppress these notifications. permission_mode is still default, and there is no approvals_reviewer, approval_route, or requires_user_input field.
Expected behavior
A passive notification integration should be able to notify only when Codex is actually waiting for the user.
This differs from an external approval UI that wants to decide allow/deny. The hook is not trying to intercept or replace the approval decision. It only wants to notify when attention is required.
Current workaround
The current options are imperfect:
- Use
PermissionRequest, which fires too early and includes auto-reviewed requests. - Use TUI
notifications = ["approval-requested"], which is useful but does not provide the same custom command/icon/sound behavior as an external notification script and does not cover every external integration shape. - Build an app-server/protocol watcher for later approval request events, which is more complex and less appropriate for a simple user hook.
Related
This overlaps with #23465, which asks to expose the effective approval reviewer to PermissionRequest hooks or support explicit defer. This issue is the passive notification use case for the same missing routing signal.
Activity
AminDhouib commentedon Jun 28, 2026
Until there is a native signal for this, we built a notification daemon that detects permission requests and pushes to phone or desktop. Supports Codex, Claude Code, and Cursor.
https://github.com/DevinoSolutions/ai-agent-notifier
fix(claude): clear blocked after an approved tool call
raine commentedon Aug 29, 2026
Workmux hits the same problem. We currently map
PermissionRequestto a waiting status, so automatic review creates a false attention signal: raine/workmux#262.reviewerwould cover automatic review, but a post-routing event is still the reliable signal since hooks or cached approvals can resolve a user-routed request before any prompt appears.Tomodo1773 commentedon Sep 11, 2026
I'm hitting this too. I use a PermissionRequest hook to play a local sound when Codex needs me, but auto-reviewed requests still trigger it even though no action is required. It gets especially noisy when a task is split across multiple subagents: unrelated requests can produce a burst of sounds even when Codex isn't waiting for me.
YeChengzhi commentedon Nov 24, 2026
I can reproduce this with Glance 0.3.4 and Codex in the ChatGPT desktop app (
26.1120.41243, macOS arm64). Glance shows Codex activity on a separate desk display.Steps to reproduce
PermissionRequest.Actual behavior
Glance repeatedly shows “Approve on computer” even though Codex handles the requests automatically and never asks me to click Approve. The display briefly looks like Codex is blocked and waiting for me.
Requested behavior
Add a passive hook that fires when Codex starts waiting for a human to approve an action or answer a question. Include a corresponding end-of-wait event or state so the display can clear the alert when the request is answered, cancelled, or otherwise resolved. Requests handled by Auto-review should produce no human-attention alert.
The existing App Server states
waitingOnApprovalandwaitingOnUserInputare a useful reference. In an isolated test using the bundled App Server and the actual Glance binary, forwarding those states produced alerts for manual approval and questions, including questions under Approve for me. Automatically approved and denied commands produced no Glance alert. This integration only needs to display status. Codex would continue to handle approvals and answers.ffaubert commentedon Nov 30, 2026
Adding a concrete case for this.
PermissionRequestruns before the approvals reviewer:core/src/tools/approvals.rsrequest_approval_with_user_promptcallsrun_permission_request_hooks, thenrequest_reviewer_approval→request_guardian_approval, and falls back touser_promptonly when Guardian returnsNone(AskUser, a disabled Guardian scope, orInputBudgetExceeded). The hook doesn't run again at that point, and its input has no reviewer field. So withapprovals_reviewer = "auto_review", a hook can't tell the requests the person must answer from the ones Guardian will handle: it can answer all of them before Guardian runs, or none.We relay approvals to the person's phone (only calls Codex was about to ask them about), so today our hook abstains whenever the reviewer is on. What would fix it: a hook that fires right before the user prompt is emitted (
request_user_approval), withPermissionRequest's input plusapproval_idand areason(policy,reviewer_ask_user,review_unavailable,managed_checkpoint). It could return allow or deny for non-checkpoint requests and race the native prompt (first answer wins, as app-server clients already do viaserverRequest/resolved). Its timing would then match Claude Code'sPermissionRequest. Related: #23465, #39447, #39835, #62039.