-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Description
What feature would you like to see?
Summary
Please add an optional notification feature so that when a Codex CLI command or prompt takes a long time (e.g., more than 5 minutes), the user receives a native system notification (e.g., macOS Notification Center, notify-send on Linux, or Toast on Windows).
Motivation
Codex CLI often processes complex or context-heavy prompts that can take several minutes to complete.
Currently, users must keep the terminal open and manually monitor progress.
A simple system notification upon completion would significantly improve the developer experience, allowing users to continue working or switch contexts without missing the result.
Proposed Design
1. CLI Flag or Config Option
Add a flag such as:
codex run long-task --notifyor an environment/config setting:
[notifications]
enabled = true
threshold_seconds = 3002. Platform-Specific Implementations
- macOS: use
osascriptorterminal-notifier - Linux: use
notify-send - Windows: use
New-BurntToastNotification(PowerShell)
3. Example Behavior
After a long-running prompt:
🔔 Codex CLI
Task completed successfully (duration: 6m 32s)
If the task completes in under 5 minutes, no notification is triggered.
4. Optional Enhancements
- Include exit status (✅ success / ❌ failed) in the message.
- Include execution time.
- Configurable thresholds per user preference.
Benefits
- Improves UX for developers running long prompts or MCP-backed tasks.
- Non-intrusive and cross-platform.
- Simple to implement (shell-level notification integration).
Example Implementation (macOS)
start=$(date +%s)
codex run "$@"
end=$(date +%s)
duration=$((end - start))
if [ $duration -gt 300 ]; then
osascript -e 'display notification "Processing complete ✅" with title "Codex CLI"'
fiAdditional information
No response