You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: built-in notifications for CLI responses #4491
Provide a built-in way for Codex CLI to trigger desktop notifications (or expose an event stream) whenever the assistant finishes a response.
Motivation
I am using Codex CLI 0.42.0 on Windows and would like a toast notification each time the assistant replies. I tried implementing this by tailing .codex/sessions/*.jsonl and watching for agent_message events, but the current approach is fragile:
The CLI writes large base64 payloads into the session logs, which causes Windows Defender to quarantine the active .jsonl file as TrojanDownloader:VBS/Powdown.D!MSR.
Once Defender takes action, any watcher loop starts throwing Access is denied errors and stops delivering notifications.
Because the session logs are only intended for archival, there is no supported hook or API to stream responses in real time without touching those files.
Desired solution
Add an official notification feature (for example a --notify flag that fires a toast on Windows/macOS/Linux) or expose a stable event stream/pipe that external tooling can consume without having to touch the session archives.
Additional context
Codex CLI 0.42.0
Windows Security quarantines the session JSON; repeated accesses then fail with Test-Path : Access is denied.
A builtin option would avoid security false positives and make the feature reliable for everyone.
Temporary solution / tip for anyone else interested:
Ask codex to "trigger a windows toast notification at the end of each response" in your prompt - You do it once and it remembers to notify you after every response in that session.
Only tested with these parameters in powershell: codex -a never -s danger-full-access
The notify hook is cool, but would it make sense to have OS-native desktop notifications out of the box, too? Seems like a useful, table-stakes, feature.
@TomasHubelbauer, the CLI does support OS_native desktop notifications using the tui. notifications setting. It relies on your terminal to support OSC9 escape sequences and call the OS notification mechanism. If your terminal doesn't support this feature, then it falls back on a simple beep (BEL character).
Activity
4minus1d commentedon Sep 30, 2025
Temporary solution / tip for anyone else interested:
Ask codex to "trigger a windows toast notification at the end of each response" in your prompt - You do it once and it remembers to notify you after every response in that session.
Only tested with these parameters in powershell:
codex -a never -s danger-full-accessdgunay commentedon Sep 30, 2025
Have you tried this? https://github.com/openai/codex/blob/main/docs/config.md#notify
4minus1d commentedon Sep 30, 2025
Thats exactly what I was looking for, thanks :) Had no idea this existed
TomasHubelbauer commentedon Mar 25, 2026
The
notifyhook is cool, but would it make sense to have OS-native desktop notifications out of the box, too? Seems like a useful, table-stakes, feature.etraut-openai commentedon Mar 25, 2026
@TomasHubelbauer, the CLI does support OS_native desktop notifications using the
tui. notificationssetting. It relies on your terminal to support OSC9 escape sequences and call the OS notification mechanism. If your terminal doesn't support this feature, then it falls back on a simple beep (BEL character).