# πŸš€ 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
πŸ’‘ Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread β€” see the highlighted reply below.

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 β†—

3 Comments

github-actions[bot] contributor Β· 10 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #4306
  • #4491
  • #3052
  • #3962

Powered by Codex Action

liamhawkins Β· 10 months ago

There is already support to notify in the config, it's not as simple as enabled = true but you can wire it up with your example notification.

I currently have this in my config for macos:
notify = ["bash", "-lc", "osascript -e 'display notification \"Task finished\" with title \"Codex\"'; afplay /System/Library/Sounds/Glass.aiff"]

AronaxClario Β· 10 months ago

thanks