codex - 💡(How to fix) Fix CLI: request_permissions prompt does not trigger approval-requested desktop notification [3 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#17716Fetched 2026-04-14 05:41:09
View on GitHub
Comments
3
Participants
3
Timeline
8
Reactions
0
Author
Timeline (top)
labeled ×4commented ×3unlabeled ×1

Code Example

Would you like to grant these permissions?

Reason: <reason>

1. Yes, grant these permissions (y)
2. Yes, grant these permissions for this session (a)
3. No, continue without permissions (n)

---

[tui]
notifications = ["approval-requested"]
RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

codex-cli 0.120.0

What subscription do you have?

Pro

Which model were you using?

gpt-5.4

What platform is your computer?

Linux 6.8.0-107-generic x86_64 x86_64

What terminal emulator and version are you using (if applicable)?

ghostty

What issue are you seeing?

When a turn reaches the built-in request_permissions tool in Codex CLI TUI, Codex shows the permission approval prompt and waits for input, but no desktop notification appears for that prompt.

This makes it easy to miss the request when the terminal is unfocused, leaving the session blocked waiting for approval.

The prompt itself appears normally in the TUI, for example:

Would you like to grant these permissions?

Reason: <reason>

1. Yes, grant these permissions (y)
2. Yes, grant these permissions for this session (a)
3. No, continue without permissions (n)

The issue is not that the prompt fails to render. The issue is that no corresponding desktop notification / approval-requested notification seems to fire for this request_permissions path.

What steps can reproduce the bug?

  1. Start Codex CLI TUI with desktop notifications enabled for approval events, for example:
[tui]
notifications = ["approval-requested"]
  1. Start a turn that can reach the built-in request_permissions tool.
  2. Make the terminal unfocused before the permission request is emitted.
  3. Let the turn reach a request_permissions prompt.
  4. Observe that Codex is waiting on the permission prompt when you return to the terminal.
  5. Observe that no desktop notification was emitted for that prompt.

I do not have a thread id to attach for this repro.

What is the expected behavior?

A request_permissions prompt should trigger the same kind of approval notification as other blocking approval flows, so the user is notified when Codex is waiting for permission while the terminal is unfocused.

At minimum, this path should emit a desktop notification consistent with approval-requested.

Additional information

Current code also suggests this is a bug rather than a feature request. In codex-rs/tui/src/chatwidget.rs on current main:

  • handle_request_user_input_now(...) calls self.notify(...)
  • handle_request_permissions_now(...) does not call self.notify(...)
  • existing approval notifications already exist for exec/edit/elicitation paths

So this looks like request_permissions is missing from an existing notification path rather than lacking a brand-new feature.

extent analysis

TL;DR

The issue can likely be fixed by adding a call to self.notify(...) in the handle_request_permissions_now function to trigger a desktop notification when the request_permissions tool is reached.

Guidance

  • Review the handle_request_permissions_now function in codex-rs/tui/src/chatwidget.rs to confirm that it does not call self.notify(...), which is likely the cause of the missing desktop notification.
  • Add a call to self.notify(...) in the handle_request_permissions_now function to trigger a desktop notification when the request_permissions tool is reached, similar to other approval flows.
  • Verify that the notifications setting in the [tui] section of the configuration file includes "approval-requested" to ensure that approval notifications are enabled.
  • Test the updated code by reproducing the steps outlined in the issue to confirm that a desktop notification is now emitted when the request_permissions prompt is reached.

Example

// In codex-rs/tui/src/chatwidget.rs
fn handle_request_permissions_now(&mut self) {
    // ... existing code ...
    self.notify("approval-requested"); // Add this line to trigger a desktop notification
}

Notes

The fix assumes that the self.notify(...) function is correctly implemented and configured to trigger desktop notifications for approval requests. If the issue persists after adding the self.notify(...) call, further investigation may be needed to ensure that the notification system is properly set up.

Recommendation

Apply the workaround by adding the self.notify(...) call to the handle_request_permissions_now function, as this is a targeted fix that addresses the likely cause of the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING