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
TUI: ALSA stderr errors from the session-complete notification sound corrupt the display on machines without audio devices #54130
Running the opencode v2 TUI on a headless Ubuntu 24.04 VM (no sound card) over SSH. Every time a prompt response finishes, the TUI display gets corrupted: the screen fills with garbage text — a mix of ALSA errors and stray debug/log lines drawn on top of the TUI. Typing clears small patches locally, and resizing the window (forcing a full repaint) restores the display until the next completion.
Reproduces in multiple terminals (VS Code integrated terminal, WezTerm), so it is not terminal-specific.
Likely cause: the built-in internal:notifications TUI plugin plays the done sound when a session goes idle (sound: { when: "always" }), which initializes native audio via Audio.create() from @opentui/core (packages/tui/src/audio.ts). On machines without audio devices, libasound writes errors directly to stderr, which lands on the alternate screen and corrupts the TUI:
ALSA lib conf.c:5731:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib confmisc.c:165:(snd_config_get_card) Cannot get card index for 0
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM dmix:0,0
Screenshot
Confirmed workaround: setting tui.attention.enabled = false in opencode.json stops the garbage (the audio module is never initialized).
Related: #48520 tracks the general class of stray output corrupting the alternate screen.
Plugins
None
OpenCode version
2.0.26
Steps to reproduce
Run the TUI over SSH on a headless Linux machine without a sound card (e.g. an Ubuntu 24.04 VM)
Submit a prompt and wait for the response to complete
When the session goes idle, ALSA/stderr garbage is drawn over the TUI; resizing the terminal forces a repaint and clears it until the next completion
Screenshot and/or share link
No screenshot attached; happy to capture one on request.
Operating System
Ubuntu 24.04 (headless VM, no sound card); client is Windows 11
Terminal
VS Code integrated terminal and WezTerm (both affected)
Thanks for the detailed report and for confirming the workaround. I think this is a duplicate of #41763: on Linux machines without a sound card, the TUI's native audio backend makes ALSA write errors to stderr, and they get drawn over the TUI. The attention sound played when a turn finishes is one of the triggers.
Possible duplicates and related issues, ordered by likelihood:
Until it's fixed, you can turn off just the sounds with "attention": { "sound": false } in your TUI config and keep notifications on, or keep using enabled: false.
The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.
Closing as a duplicate of #41763, since there's been no reply in the past day. That issue covers the same problem: on Linux machines with no sound card, the TUI's audio backend writes ALSA errors to stderr and they corrupt the screen, often when a turn finishes and the done sound plays. Please follow #41763 for updates, and add details there if your setup behaves differently. Open PR #51854 aims to skip audio when there is no playback device. Until then, "attention": { "sound": false } stops the errors and keeps notifications on. If this turns out to be a different problem, reply here and we can reopen it.
Activity
opencode-agent commentedon Oct 9, 2026
Thanks for the detailed report and for confirming the workaround. I think this is a duplicate of #41763: on Linux machines without a sound card, the TUI's native audio backend makes ALSA write errors to stderr, and they get drawn over the TUI. The attention sound played when a turn finishes is one of the triggers.
Possible duplicates and related issues, ordered by likelihood:
Until it's fixed, you can turn off just the sounds with
"attention": { "sound": false }in your TUI config and keep notifications on, or keep usingenabled: false.The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.
opencode-agent commentedon Oct 10, 2026
Closing as a duplicate of #41763, since there's been no reply in the past day. That issue covers the same problem: on Linux machines with no sound card, the TUI's audio backend writes ALSA errors to stderr and they corrupt the screen, often when a turn finishes and the done sound plays. Please follow #41763 for updates, and add details there if your setup behaves differently. Open PR #51854 aims to skip audio when there is no playback device. Until then,
"attention": { "sound": false }stops the errors and keeps notifications on. If this turns out to be a different problem, reply here and we can reopen it.