Repository navigation
Description
Summary
The TUI logo "burst" feature added in #22098 leaves audio playback in a broken
state after mouse interaction ends. The synthesized charge/burst tones do not
stop cleanly — they degrade into continuous loud scratching, buzzing, and
hissing on the system audio output device. coreaudiod simultaneously pins a
CPU core at near-100% (observed: 480.5% CPU on an M4 Max, i.e. ~5 cores
saturated). The noise persists indefinitely until OpenCode is killed or the
audio output device is power-cycled.
On headphones the artifact is severe enough to be physically painful —
closer to a stuck oscillator with a runaway envelope than a normal "click" of
an incomplete sample. This is consistent with a generated-tone code path (per
the PR's own commit message: "Give the logo pulse a generated charge hum and
burst sound", 7d853f3)
where the oscillator/gain node is not torn down when the mouse leaves the logo
hit region.
Reproduction
- Launch
opencode(v1.14.28) in a terminal that supports mouse reporting. - Move the mouse cursor over the TUI logo. Hold briefly, then move away.
- Observe: the charge/burst sounds play, then transition into a continuous
loud noise on the default output device. - Run
top -o cpuor Activity Monitor —coreaudiodis at several hundred
percent CPU. - Noise does not stop on its own. Killing the `opencode` process stops it.
Environment
| OpenCode version | 1.14.28 |
| macOS | 26.3.1 (build 25D2128) |
| Hardware | MacBook Pro, Apple M4 Max (Mac16,6) |
| Terminal | kitty (`TERM=xterm-kitty`) |
| Default output device | Jabra EVOLVE 20 (USB, 48 kHz) |
| `coreaudiod` CPU during incident | 480.5% |
| `opencode` process RSS | ~720 MB |
Suspected cause
PR #22098 ships generated audio (oscillator + gain envelopes) rather than
sample playback. A likely failure mode:
- A `mouseenter` / `mousedown` event starts the charge oscillator.
- The corresponding `mouseleave` / `mouseup` / cancellation path does not
always run (event missed, debounce race, or the burst-release branch
short-circuits the cleanup), so the oscillator keeps emitting and its gain
node is never ramped to zero or stopped. - The runaway tone, combined with whatever the audio backend is doing on the
Zig/native side, drives `coreaudiod` into a hot loop.
The kitty terminal aggressively reports mouse motion events, which may make
the mismatched-event scenario much more likely to fire than in terminals that
report only clicks.
Severity
This is not a cosmetic issue. Headphone users (the population most likely to
be running a CLI dev tool quietly) get a sudden, loud, sustained,
non-attenuating noise directly into their ears with no in-app way to stop it.
That is a real risk of hearing discomfort or harm. The only mitigations
currently available are:
- Kill OpenCode.
- Yank the headphone/USB cable.
- Mute at the OS level before opening OpenCode.
There is no documented setting to disable the logo audio. Issue #22528 has
been open since April 15 asking for a toggle and is not yet resolved (PR
#23086 referenced but not shipped at 1.14.28).
Asks
- Immediate: ship a way to disable logo sound effects (preferably
off by default, given the active complaints on feat: add interactive burst to the TUI logo #22098 and How to turn off sound effects and animations in 1.4.4 #22528). - Fix: audit the oscillator/gain lifecycle in the logo burst code so
that any path out of the charge state (mouseleave, focus loss, terminal
resize, app backgrounded, exit) deterministically stops every audio node
it created. Add a watchdog that hard-stops audio after N ms with no
active interaction. - Forward-looking, said respectfully: please weigh the cost/benefit
before shipping decorative TUI features that produce audio. A logo
easter-egg is fun. A logo easter-egg that, when buggy, plays painfully
loud noise into a developer's headphones with no off switch is not a
feature — it is a liability. Audio output from a developer tool should
default to off, be opt-in, and have a kill switch documented in the
release notes.
Happy to provide a screen recording with audio if that would help.
Activity
nerdgod commentedon May 5, 2026
I don't care about whether the sound-corruption bug can be fixed. I want this entire feature to be hidden behind an opt-out feature flag in the config.
kitlangton commentedon May 13, 2026
The logo sound effects have been removed in #27183. This should be out in the next release.
Sorry for the pain and surprise this caused. That was very unintentional. It also looks like some terminals/IDE terminals may have triggered the sound from hover or other mouse events, even though it was only meant to trigger on click.
I’m going to close this since the audio path that caused this has been removed.