Skip to content

feat(cli): optional notification sounds (opt-in, system sounds) - #4329

Closed
samlouiscohen wants to merge 2 commits into
openai:mainfrom
samlouiscohen:feat/notifications-sound
Closed

samlouiscohen wants to merge 2 commits into
openai:mainfrom
samlouiscohen:feat/notifications-sound

Conversation

@samlouiscohen

@samlouiscohen samlouiscohen commented Sep 27, 2025 •

Copy link
Copy Markdown

Adds an opt-in completion sound in the CLI.

Why

Long-running turns (often minutes to tens of minutes) benefit from audible completion cues so users can context-switch without polling the terminal.

What’s in this PR

  • Config (opt-in) via ~/.codex/config.toml:
    [notifications]
    sound = true
    only_on_long_runs_ms = 10000
    success_tone = "default"
    error_tone = "default"
  • Cross-platform system sounds with safe defaults:
    • macOS → Hero (success), Basso (error)
    • Windows → SystemSounds.Asterisk / SystemSounds.Hand
    • Linux → canberra complete / dialog-error
  • Fallback to terminal BEL if no backend is available
  • No bundled assets; zero footprint by default

Behavior

  • Fires only on final CLI exit (not clap parse errors)
  • Respects only_on_long_runs_ms threshold
  • Minimal changes: a short wrapper in cli_main + notifications.rs helper

Notes

  • Feature is off by default
  • Happy to follow up with support for custom sound file paths

Closes #3962

Adds opt-in [notifications] section to ~/.codex/config.toml:
- sound = true|false (default false)
- only_on_long_runs_ms = <int>
- success_tone / error_tone = "default" or system-sound id

Cross-platform mappings:
- macOS → Hero (success), Basso (error)
- Windows → SystemSounds.Asterisk / Hand
- Linux → canberra 'complete' / 'dialog-error'

Falls back to terminal bell if unavailable. Zero new assets, fully optional.
@github-actions

github-actions Bot commented Sep 27, 2025 •

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@samlouiscohen

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@etraut-openai

Copy link
Copy Markdown
Contributor

Thanks for the contribution, and apologies for the slow response. We've received many PRs, and we don't have the bandwidth on the codex team to review all of them.

We've updated our contribution guidelines to clarify that we're currently accepting contributions for bugs and security fixes, but we're not generally accepting new features at this time. We need to make sure that all new features compose well with both existing and upcoming features and fit into our roadmap. If you would like to propose a new feature, please file or upvote an enhancement request in the issue tracker. We will generally prioritize new features based on community feedback.

@github-actions github-actions Bot locked and limited conversation to collaborators Oct 31, 2025
@openai openai unlocked this conversation Oct 31, 2025
youta7 added a commit to youta7/ta-codex that referenced this pull request Nov 10, 2025
swordfish444 pushed a commit to swordfish444/codex that referenced this pull request Feb 26, 2026
@0-sayed

0-sayed commented Apr 21, 2026

Copy link
Copy Markdown

our roadmap

Can you share it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Play a sound when Codex finishes a prompt / task

3 participants