Codexでエージェントが作業完了時に音を鳴らす方法
Codexを対話モードで使うとき、返答完了の音があると待ち時間がかなり楽になります。
ここでは、すぐ使える設定と、音を切り替えるためのコピペ用プリセットをまとめます。
動作確認環境
- OS: macOS
- Codex CLI:
0.104.0(2026年2月22日時点で確認)
初回設定(このまま貼る)
~/.codex/config.toml に次を設定します。
notify = ["sh", "-lc", "afplay /System/Library/Sounds/Funk.aiff >/dev/null 2>&1 || printf '\\a'"]
[tui]
notifications = ["agent-turn-complete"]
この設定で、対話モードの1ターン完了時に Funk が鳴ります。
本記事のレポジトリ(いいねお願いします)
音を変えるときの最短手順
~/.codex/config.toml の notify = ... の1行だけ差し替えればOKです。
[tui].notifications = ["agent-turn-complete"] はそのまま使います。
コピペ用プリセット(notify 1行)
Funk
notify = ["sh", "-lc", "afplay /System/Library/Sounds/Funk.aiff >/dev/null 2>&1 || printf '\\a'"]
Glass
notify = ["sh", "-lc", "afplay /System/Library/Sounds/Glass.aiff >/dev/null 2>&1 || printf '\\a'"]
Hero
notify = ["sh", "-lc", "afplay /System/Library/Sounds/Hero.aiff >/dev/null 2>&1 || printf '\\a'"]
Ping
notify = ["sh", "-lc", "afplay /System/Library/Sounds/Ping.aiff >/dev/null 2>&1 || printf '\\a'"]
Pop
notify = ["sh", "-lc", "afplay /System/Library/Sounds/Pop.aiff >/dev/null 2>&1 || printf '\\a'"]
Submarine
notify = ["sh", "-lc", "afplay /System/Library/Sounds/Submarine.aiff >/dev/null 2>&1 || printf '\\a'"]
音だけ先に確認したいとき
Codexを起動しなくても、afplay で試聴できます。
afplay /System/Library/Sounds/Funk.aiff
使える標準音を一覧で見る場合:
ls /System/Library/Sounds
反映手順
-
codexを完全に終了する -
codexを再起動する - 対話で1回返答を生成し、完了時に音が鳴ることを確認する
鳴らないときの確認ポイント
-
notify = ...が複数行になっていないか -
[tui].notificationsが["agent-turn-complete"]になっているか -
afplay /System/Library/Sounds/Funk.aiffで音が出るか - 出ない場合は、出力デバイス・ミュート・音量のOS設定を確認する
免責事項
本記事の内容については、いかなる責任も負いません。