Notify not getting triggered
Open 💬 13 comments Opened Jan 8, 2026 by AdamJamil
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
codex-cli 0.77.0
What subscription do you have?
Plus
Which model were you using?
_No response_
What platform is your computer?
Windows/WSL
What issue are you seeing?
I noticed that Windows notifications were no longer popping up when codex was done thinking. I then went into WSL's ~/.codex/config.toml, and added notify = ["bash", "-c", "echo $(date) >> /tmp/codex-notify.log"]. The file was never written to, so it seems like codex is no longer triggering notify. The terminal was not in focus for these tests. The behavior began midway through today, an hour into my session. I was using codex-cli 0.77.0, then ran npm update -g @openai/codex for the latest update, and the behavior persisted.
What steps can reproduce the bug?
- Install codex in WSL2 - Ubuntu
- Ask codex anything which takes some time to think about (I asked it: "parameterize the vectors in the tangent bundle of the torus")
- Immediately navigate away from the terminal
- Add
notify = ["bash", "-c", "echo $(date) >> /tmp/codex-notify.log"]to config.toml - Repeat steps 2 & 3. Observe that /tmp/codex-notify.log is still empty.
What is the expected behavior?
_No response_
Additional information
_No response_
13 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Thanks for reporting.
As a workaround, you might want to try the
tui.notificationsfeature documented here.I have a bad workaround that definitely works:
tmux new-session -d -s codex 'codex'tmux a)It will continuously beep while codex is not thinking. You can kill and restart it as you please
yep definitely recent regression. not making any major changes, assuming this will go back to as-was?
@aavetis, do you happen to know which version of the Codex CLI this regression started? If so, it could help us track down the problem more quickly.
i am always auto updating; i noticed it a couple days ago. must have been .77 then, as reported above. because we're already on .79 and i still see the issue
Can we rollback to say, .76? This is a pretty massive regression in UX; I assume most people rely on notifications to optimize their productivity, given the long iteration cycles.
Hi, I don’t have the exact version information, but I started using Codex around the
0.8xversions. I’ve been using the default notification configuration without any customization. Notifications did not work in VS Code when opened in a WSL environment, although they did work when using WSL/Ubuntu sessions via Windows Terminal.After upgrading to the
0.9xversions over the past two weeks, notifications in Windows Terminal have also stopped working.@rayjasson98, I think you're talking about the
tui.notificationssetting, not thenotifyhook that is covered in this thread. The handling oftui.notificationsin WSL did change in recent releases. For details about howtui.notificationsworks, refer to this documentation.this should be fixed, confirmed in 0.98. i was just chatting with codex and heard the notification i used to hear and thought, hey that's a sound i haven't heard in a while :)
I’m seeing a very similar issue in my environment as well, but in native Windows rather than WSL.
What I confirmed:
0.120.0notifysetting is accepted and Codex starts normallyI reproduced this with very minimal commands. For example, I configured
notifyto run a simple file-append command, but after a completed turn the file was never created or updated.I tested both of these forms:
pwsh.exewithAdd-Contentcmd.exe /c echo complete>>...In both cases, the Codex UI appeared to complete the response and return to the input prompt, but there was still no trace that the notify command had executed.
I also checked the source:
notifyis implemented as anafter_agenthookspawn()failure, the code logsafter_agent hook failed; continuingSo in this case, it does not look like a simple
spawn()failure. It looks more like theafter_agentnotify path itself may not be running at all.I also noticed that the upstream
notifytest seems to exclude Windows, so there may still be a Windows-specific gap here.This may not be WSL-specific. There may be a broader Windows-side issue affecting
notify.Indexed this hook ticket in the umbrella tracker: #21753
Goal: collect the scattered Codex hook requests and bugs into one parity matrix for Full Claude Code Hook Parity (29+), while preserving this issue as the detailed thread for its specific behavior.
Adding a code-level root cause for one specific manifestation of this bug on Windows — the case where
notify[0]is an npm-installed shim (.cmd/.bat). This does not explain @zio3's report ofpwsh.exe/cmd.exealso failing — that's a different, deeper issue and worth tracking separately.Root cause for the
.cmd/.batcasecodex-rs/hooks/src/registry.rs:225:Command::newon Windows usesCreateProcessW, which does not consultPATHEXT. Sonotify = [\"my-notifier\"]where the actual file ismy-notifier.cmd(typical for any npm-global) fails withNotFound— the Rust analog of Node'sspawn EINVALfrom CVE-2024-27980 (cross-ref: copilot-cli#1882).The failure is then swallowed as
HookResult::FailedContinueinlegacy_notify.rs:65, which matches the \"silently broken\" symptom.Why this looks like a missed sweep
Codex already applied this exact fix in four other spawn sites:
| Path | Fix | PR |
| --- | --- | --- |
|
tui/src/external_editor.rs:25-29|which::which()to resolvecode→code.cmd| #7606 ||
rmcp-client/src/program_resolver.rs:50|which::which_in()for MCP stdio launches | #3828 ||
cli/src/doctor.rs:108-111| hardcodednpm.cmdfor the doctor probe | #22967 ||
cli/src/main.rs:678-682| wraps update action incmd /Cfor PATHEXT | #6387 |The legacy notify hook path was missed.
Proposed one-line fix
Mirror the
external_editor.rsapproach:This fixes the
notify = [\"my-notifier\"]case but, again, won't address @zio3'spwsh.exe/cmd.exereport — those should resolve fine since they're real.exefiles. That symptom points at theafter_agenthook not firing at all on native Windows, which warrants a separate investigation.