# πŸš€ Feature Request: Add native OS notification when long-running Codex CLI tasks complete

Resolved πŸ’¬ 3 comments Opened Oct 9, 2025 by AronaxClario Closed Oct 11, 2025

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 --notify

or an environment/config setting:

[notifications]
enabled = true
threshold_seconds = 300

2. Platform-Specific Implementations

  • macOS: use osascript or terminal-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"'
fi

Additional information

_No response_

View original on GitHub β†—

This issue has 3 comments on GitHub. Read the full discussion on GitHub β†—