You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
coreaudiod pinned at ~9% CPU: notification sound leaks BuiltInSpeakerDevice audio stream (regression of #24668) #35242
coreaudiod gets pinned at ~9% CPU indefinitely after opencode plays a completion/notification sound. The one-shot sound opens a BuiltInSpeakerDevice audio-output stream that is never torn down, so macOS keeps the Core Audio output engine running (and holds a PreventUserIdleSystemSleep power assertion) for the entire lifetime of the opencode process. CPU drops to 0% the instant opencode exits.
This is the same class of leak as the closed #24668 (logo charge-hum audio leak), reproducing on the current release — appears to be a regression / incomplete fix.
Environment
opencode: 1.17.13 (latest; matches npm [email protected] and release v1.17.13)
macOS: 15.7.5 (24G624), Apple Silicon (arm64)
Steps to reproduce
Run an opencode session with the completion/notification sound enabled.
Trigger a notification (e.g. let an assistant response complete so the "ding" plays).
Observe coreaudiod CPU with top/ps.
Expected
The notification sound is a fire-and-forget one-shot. After it finishes, opencode should release the audio output stream so coreaudiod returns to idle (~0%).
Actual
opencode keeps the output stream open for the whole session. coreaudiod sits at ~9% CPU continuously and drops to 0% only when opencode exits. Every subsequent notification re-opens a fresh leaked stream.
Evidence
Persistent power assertion owned by the opencode PID (survives long after the sound ended):
Watched a fresh stream appear ~40s after a notification played, confirming each sound re-triggers the leak. Over a long-lived session (27-day uptime here), leaked streams accumulated and coreaudiod had burned ~31 CPU-hours.
Workaround
Disabling the completion/notification sound stops the leak entirely (no sound played → no output stream opened → coreaudiod stays at 0%).
Activity
github-actions commentedon Sep 2, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.