Feature request: built-in notifications for CLI responses
Resolved 💬 5 comments Opened Sep 30, 2025 by 4minus1d Closed Nov 14, 2025
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
### Summary
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
.jsonlfile asTrojanDownloader:VBS/Powdown.D!MSR. - Once Defender takes action, any watcher loop starts throwing
Access is deniederrors 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.
5 Comments
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-accessHave you tried this? https://github.com/openai/codex/blob/main/docs/config.md#notify
Thats exactly what I was looking for, thanks :) Had no idea this existed
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.@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).