anomalyco / anomalyco/opencode

Desktop 1.18.13: no completion/attention sound — @opentui audio fails under Node runtime

Open
#40,445 1 comment 0 reactions 1 assignee View on GitHub

@Brendonovich is already working on this.

Since Aug 4, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Environment
  • OpenCode Desktop: 1.18.13 (Windows x64, @opencode-aidesktop)
  • OS: Windows 11
  • Previous behavior: completion sound worked on earlier desktop versions (~1 week ago)
Problem

No "session done" / attention sound plays in the desktop app after a response finishes. Attention config is fully enabled in tui.json (enabled: true, sound: true, volume: 0.7, custom ./sounds/done.wav which is valid and plays fine via Windows SoundPlayer). Nothing in the config changed.

Root cause (confirmed by direct reproduction)

The desktop app runs on a Node runtime (no Bun global; e.g. Bun-using plugins throw Bun is not defined). OpenCode's attention sounds go through @opentui/core, which needs Bun FFI to load its native Zig audio library. Under Node, Audio.create() throws, so getAudio() in packages/tui/src/audio.ts returns null and all sounds fail silently (only console.debug logs, not visible in the info log).

Reproduction (same package, two runtimes):

const { Audio } = await import("@opentui/core")
Audio.create({ autoStart: false })
// Node 22: throws "Failed to resolve the native audio library"
// Bun 1.3: works fine
Expected

The desktop app should play attention/completion sounds. Options: bundle a Node-compatible audio backend, or load the native library without depending on Bun FFI when running under Node.

Impact

No sound feedback on session completion / errors / permission prompts in the desktop app (Windows). Related: the CLI (Bun runtime) is unaffected.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.