Repository navigation
Description
Summary
The desktop app's Sound effects settings cover three events: Agent (turn finished, session.idle), Permissions (permission.asked), and Errors. There is no sound for the fourth "attention required" event: when the agent uses the question tool and waits for the user's answer (question.asked). The user gets (at best) a desktop notification and an in-app toast, but no audio — so the question is easily missed when working in another window.
Use case
The ask-user flow is a core interaction: the agent blocks until the user answers. In practice I routinely switch to another window while the agent works (long tasks, builds). When the agent then asks a question:
- the turn-finished sound does not play (the session is not idle — it is waiting),
- there is no sound at all,
so the agent can sit blocked for many minutes while I have no idea it needs me. This is precisely the situation the existing sounds were designed for ("play a sound when the agent finishes or requires attention"), and questions are the one attention-required event with no audio.
Investigation already done (desktop app v1.18.30, asar examined)
While building a local patch for myself, I mapped how sound playback is wired:
- The sound Agent is played in a handler listening on the global SDK event stream, but only for
event.type === "session.idle". This same global listener never receivesquestion.asked(verified at runtime with a Chrome DevTools Protocol listener:session.idlearrives,question.askeddoes not). question.askedis handled on a different path: the parallel sync-store reducer (case "question.asked"withdata.question[...]/setData(...)), which is what actually renders the question UI.- The
useSDKNotificationToastshandler (the one with thequestion.askedbranch that plays the desktop notification + toast) is not mounted at startup — its module top-level never runs until some later point (verified:windowlisteners registered there are absent), so anything wired only into that handler can miss questions too. - Playing
new Audio(...)from the renderer works reliably once the user has interacted with the window (no autoplay-policy issue).
I ended up patching the asar to call an audio play directly inside the question.asked case of the parallel reducer (data), which works: I now hear a sound every time the agent asks me something.
Suggested implementation
Add a fourth sound channel to the settings, mirroring the existing three:
sounds: {
agentEnabled: true,
agent: "staplebops-01",
permissionsEnabled: true,
permissions: "staplebops-02",
errorsEnabled: true,
errors: "nope-03",
questionsEnabled: true, // new
questions: "alert-01" // new
}- New "Questions" row in Settings → Sound effects (same
SOUND_OPTIONSlist), with a matchingsettings.general.sounds.questionstranslation key. - Play it wherever the app processes
question.askedon the real-time path (the parallel reducer branch, or any handler that is guaranteed to receivequestion.asked— note again that the global SDK listener used forsession.idledoes not receive this event in my testing). - Keep a per-session anti-spam cooldown similar to the existing notification cooldown (
alertedAtBySession), so a question plays one sound, not a chorus.
Why I cannot work around this myself (cleanly)
The settings store is not reachable from the plugin API, and the only reliable injection point for this event is deep in the renderer bundle — so the clean fix has to be native. My own workaround required patching app.asar (re-applied after every app update), which is not something I want to maintain long-term, and other users cannot do it at all.
Environment
- App: opencode desktop v1.18.30
- OS: Linux Mint 22.3
- File examined:
/opt/OpenCode/resources/app.asar - Relevant code locations (textual anchors; offsets shift between versions):
- Sound settings UI +
SOUND_OPTIONSlist (renderer bundle, searchSOUND_OPTIONS) - Default settings block:
sounds: { agentEnabled: true, agent: "staplebops-01", ... } - Global SDK listener playing the Agent sound for
session.idle(searchhandleSessionIdle) useSDKNotificationToastshandler:permission.askedplays a sound,question.askedonly callsplatform2.notify- Real-time reducer:
case "question.asked"in the parallel store (data.question[question.sessionID])
- Sound settings UI +
Acceptance criteria
- A "Questions" sound setting exists (enabled + sound id), consistent with Agent/Permissions/Errors.
- A sound plays when the agent asks a question, whether the session is focused or in the background.
- A question plays the sound once (cooldown respected), and answering/dismissing it stops any further alerting for that question.
- The existing three sound behaviors are unchanged.
Thanks for considering this.
Activity
github-actions commentedon Sep 16, 2026
This issue might be a duplicate of existing issues. Please check:
question.askedevents) as a built-in featureBoth cover the same core gap — no audio alert when the agent is waiting for the user's answer — that this issue describes.
frediaform-hub commentedon Sep 17, 2026
Confirming this is not a duplicate of the two referenced issues:
What #49371 requests is different and not covered by either: the desktop app itself should play a (user-selectable) sound natively when the agent asks a question (
question.asked). There is currently no sound path in the desktop app for that event, and the TUI plugin workaround doesn't apply to the desktop client.opencodejr commentedon Oct 28, 2026
Thanks for the detailed request and for working through the asar code yourself.
You're on the desktop app v1.18.30. That's OpenCode v1, which only gets fixes for critical bugs such as data loss, crashes or security problems, so this is unlikely to change in v1. Development now happens in v2 (npm package
@opencode/cli,opencodecommand), and we encourage upgrading.In v2 this is being worked on, but nothing has been released yet. These are the related issues and PRs, most relevant first:
permission.askedandquestion.askedhandling (notification and sound) to the v2 app. For now questions use the Permissions sound setting rather than a separate "Questions" channel.If this also happens on v2 after those changes, or you believe it's critical, please reply here.
opencodejr commentedon Oct 29, 2026
We haven't heard back, so I'm closing this as not planned. This request is for the v1 desktop app (v1.18.30), and v1 only gets critical fixes. A separate sound for agent questions is a feature, not a critical bug.
In v2, question alerts are being worked on in #56044 (open PR that plays the Permissions sound for
question.asked). For v2, see also #59779 (no system notification for pending questions) and #41355 (configurable per-event sounds). If you upgrade to v2 and it still doesn't alert you when the agent asks a question, please open a new issue with your v2 version. Thanks again for the thorough write-up.