Skip to content

# 🚀 Feature Request: Add native OS notification when long-running Codex CLI tasks complete #4998

Closed

Description

@AronaxClario

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

Activity

  1. liamhawkins commented on Oct 9, 2025

    @liamhawkins

    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"]

  2. AronaxClario commented on Oct 11, 2025

    @AronaxClario
    Author

    thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions