In Windows Terminal, PowerShell and the VS Code terminal, the Codex CLI's built-in alert is only the terminal bell, so for a real Windows notification you add one yourself. Put a Stop hook (for "finished") and a PermissionRequest hook (for "wants approval") in %USERPROFILE%\.codex\hooks.json that run PowerShell, then trust them with /hooks. The BurntToast module gives a proper toast. If Codex runs inside WSL, the hooks run in Linux, so they call powershell.exe through Windows interop to reach the Windows desktop.
01What Codex does by default on Windows
Codex's built-in notification is on by default and fires when a turn finishes or an approval is waiting while the terminal isn't focused. On Windows Terminal it uses the bell character, because Codex only sends the OSC 9 desktop notification to terminals it knows support it (Ghostty, iTerm2, Kitty, Warp and WezTerm). Windows Terminal's response to the bell is set per profile: in Settings > Profiles > Advanced, Bell notification style can be audible, flash the window or flash the taskbar. WezTerm on Windows gets the OSC 9 notification.
The built-in notifications guide covers the [tui] settings.
02Where the hooks file goes
For Codex running natively on Windows, the user hooks file is %USERPROFILE%\.codex\hooks.json, for example C:\Users\you\.codex\hooks.json. If you've set CODEX_HOME, it's in that folder instead. Inside WSL, it's ~/.codex/hooks.json in your Linux home.
03Native Windows: a toast with BurntToast
Install the module once, in PowerShell:
Install-Module BurntToast -Scope CurrentUser
New-BurntToastNotification -Text 'Codex', 'Test'
If the test toast appears, add the hooks:
{
"hooks": {
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "powershell -NoProfile -Command \"New-BurntToastNotification -Text 'Codex','Codex has finished' | Out-Null\""
}
]
}
],
"PermissionRequest": [
{
"hooks": [
{
"type": "command",
"command": "powershell -NoProfile -Command \"New-BurntToastNotification -Text 'Codex','Codex wants your approval' | Out-Null\""
}
]
}
]
}
}
Then start codex, type /hooks and trust both. Codex skips hooks it hasn't been told to trust.
Keep the commands silent: Codex treats plain text printed by a Stop hook as invalid. The PermissionRequest hook makes no decision, so the approval prompt still appears in the terminal.
Starting PowerShell takes a moment. If it slows the end of each turn, add "async": true to the handler so Codex doesn't wait for it.
04Native Windows with nothing to install
Without BurntToast, a short script can show a balloon tip from Windows Forms. Save it as %USERPROFILE%\.codex\hooks\notify.ps1:
param([string]$Message = "Codex has finished")
Add-Type -AssemblyName System.Windows.Forms
$n = New-Object System.Windows.Forms.NotifyIcon
$n.Icon = [System.Drawing.SystemIcons]::Information
$n.Visible = $true
$n.ShowBalloonTip(5000, "Codex", $Message, "Info")
Start-Sleep -Seconds 6
$n.Dispose()
and call it with:
"command": "powershell -NoProfile -ExecutionPolicy Bypass -File C:\\Users\\you\\.codex\\hooks\\notify.ps1",
"async": true
Backslashes in JSON need doubling. async keeps Codex from waiting while the balloon is on screen. Avoid message boxes in a hook: they block until someone clicks OK.
05Codex in WSL
When you run codex inside WSL, hooks run in Linux. There is usually no Linux notification daemon there, so call Windows instead:
"command": "powershell.exe -NoProfile -Command \"New-BurntToastNotification -Text 'Codex','Codex has finished' | Out-Null\""
This needs Windows interop (on by default in WSL) so that powershell.exe is found, and BurntToast installed on the Windows side. If powershell.exe isn't on the WSL PATH, use its full path: /mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe.
06The notify setting
For "finished" only, Codex's notify setting in config.toml can run a script with no trust step. The notify guide has a cross-platform Python script with a Windows branch.
07Or use codex-notifier
Notifier for Codex's free codex-notifier tool installs the hooks for you and shows a Windows notification when Codex finishes, wants approval or asks a question. In PowerShell (Windows support is in beta):
irm https://notifierforcodex.com/install.ps1 | iex; codex-notifier pair
codex-notifier pair first adds six entries to %USERPROFILE%\.codex\hooks.json and marks them trusted in config.toml, so there's no /hooks step. Then it pairs the iPhone or Android app and the same moments reach your phone, where you can approve or reject, answer, or send the next instruction. It also works in WSL, where it behaves as it does on Linux. Notifier for Codex is independent and not affiliated with OpenAI; see pricing for the apps.
08FAQ
Why don't I get a toast from Codex's built-in notification?
Windows Terminal and the VS Code terminal get the bell, not a desktop notification. Set the profile's bell style to taskbar flash, or use a hook.
Which shell runs my hook command?
Write hook commands that work whatever starts them: call powershell -NoProfile -Command "..." or -File script.ps1 explicitly, as above, rather than relying on PowerShell syntax at the top level. If a command must differ on Windows from your other machines, use the handler's commandWindows field.
The toast shows in PowerShell but not from Codex. What's wrong?
Check /hooks shows the hook as trusted, that hooks.json is valid JSON with doubled backslashes, and that Focus assist (Do Not Disturb) isn't hiding notifications.
Does this work with Codex in the VS Code terminal on Windows?
Yes. Hooks run from Codex, not from the terminal, so the same hooks work in any terminal where you run codex.