#!/usr/bin/env bash
payload="${1:-$(cat)}"
DEFAULT_CODEX_SOUND="<your_sound_here.wav>"
# Set CODEX_CUSTOM_SOUND in your shell config (e.g. ~/.zshrc;~/.bashrc;...) to override the alert path.
CODEX_CUSTOM_SOUND="${CODEX_CUSTOM_SOUND:-$DEFAULT_CODEX_SOUND}"
if command -v jq >/dev/null 2>&1; then
notification_type=$(printf '%s' "$payload" | jq -r '.type // empty')
case "$notification_type" in
"agent-turn-complete")
afplay "$CODEX_CUSTOM_SOUND" 2>/dev/null
;;
*)
;;
esac
else
afplay "$CODEX_CUSTOM_SOUND" 2>/dev/null
fiAdd this to your codex config
notify = ["/Users/<YOUR_USER>/.codex/hooks/notify.sh"]
tui.notifications = truechmod +x notify.sh

Be sure that you have the full path in the .codex/config.toml
notify = ["/Users/<YOUR_USER>/.codex/hooks/notify.sh"]
And be sure to set the full path to your .wav file
DEFAULT_CODEX_SOUND="/Users/kregenrek/projects/sounds/icq.wav"