codex - 💡(How to fix) Fix Expose plan-mode-prompt and approval-requested through top-level notify [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#19921Fetched 2026-04-29 06:25:26
View on GitHub
Comments
3
Participants
3
Timeline
14
Reactions
0
Author
Timeline (top)
labeled ×6commented ×3unlabeled ×3mentioned ×1

Codex now emits native TUI notifications for plan-mode request_user_input prompts via plan-mode-prompt after #17417. That works when terminal notifications are enabled.

However, the top-level notify external command still only supports agent-turn-complete. This means users cannot use the native Codex external notification primitive for the most important "needs response" states: plan-mode questions and approval requests.

Root Cause

  1. Configure Codex TUI notifications.
  2. In plan mode, prompt Codex to call request_user_input.
  3. Codex emits the plan-mode questionnaire and terminal notification.
  4. The external notify command does not run because the event is not agent-turn-complete.

Code Example

[tui]
notifications = ["plan-mode-prompt", "approval-requested"]
notification_method = "bel" # or "osc9"
notification_condition = "always"

---

notify = ["python3", "/path/to/notify.py"]
RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

codex-cli 0.125.0

What platform is your computer?

macOS

What terminal emulator and version are you using?

Ghostty 1.3.0-HEAD+9fa3ab0 and cmux 0.63.2 (79) [179b16ce6]

Summary

Codex now emits native TUI notifications for plan-mode request_user_input prompts via plan-mode-prompt after #17417. That works when terminal notifications are enabled.

However, the top-level notify external command still only supports agent-turn-complete. This means users cannot use the native Codex external notification primitive for the most important "needs response" states: plan-mode questions and approval requests.

Current behavior

This works for terminal-native notifications:

[tui]
notifications = ["plan-mode-prompt", "approval-requested"]
notification_method = "bel" # or "osc9"
notification_condition = "always"

This works only for completion:

notify = ["python3", "/path/to/notify.py"]

Per the docs, notify currently receives supported events, currently only agent-turn-complete.

Expected behavior

notify should also be able to receive the same high-value TUI notification event types, especially:

  • plan-mode-prompt
  • approval-requested
  • any future blocked / needs-response state

This would allow users to implement one external alert command for "never miss needs response" workflows without relying on terminal-specific OSC/BEL behavior or custom transcript monitoring.

Repro / motivation

  1. Configure Codex TUI notifications.
  2. In plan mode, prompt Codex to call request_user_input.
  3. Codex emits the plan-mode questionnaire and terminal notification.
  4. The external notify command does not run because the event is not agent-turn-complete.

Related

  • #17252 reported that plan-mode questionnaire notifications did not fire.
  • #17417 fixed that by mapping request_user_input to plan-mode-prompt.
  • This request is separate: expose that now-working event through the top-level external notify primitive.

extent analysis

TL;DR

The notify external command should be updated to support additional event types, such as plan-mode-prompt and approval-requested, to enable unified external alerting for "needs response" states.

Guidance

  • Review the documentation for the notify command to understand the current supported events and potential limitations.
  • Consider modifying the notify.py script to handle the new event types, if possible, or create a new script that can handle these events.
  • Test the updated notify command with the new event types to ensure it works as expected.
  • If the notify command cannot be updated, explore alternative solutions, such as using terminal-specific notifications or custom transcript monitoring.

Example

notify = ["python3", "/path/to/updated_notify.py"]

In updated_notify.py, add event handling for plan-mode-prompt and approval-requested:

if event == "plan-mode-prompt":
    # Handle plan-mode prompt notification
elif event == "approval-requested":
    # Handle approval request notification

Notes

The solution depends on the specific implementation of the notify command and the notify.py script, which are not provided in the issue.

Recommendation

Apply workaround: Update the notify.py script to handle the new event types, if possible, to enable unified external alerting for "needs response" states. This approach allows for a flexible solution that can be adapted to the specific use case.

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…

FAQ

Expected behavior

notify should also be able to receive the same high-value TUI notification event types, especially:

  • plan-mode-prompt
  • approval-requested
  • any future blocked / needs-response state

This would allow users to implement one external alert command for "never miss needs response" workflows without relying on terminal-specific OSC/BEL behavior or custom transcript monitoring.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING