This guide teaches you how to bring the cool feature of opencode beeping when it needs you.
Recently, I started using opencode.
And one critical feature for me was missing: beeping when it needs my attention.
Reading docs was not enough for me.
So consider this guide an easy path to set up the missing feature.
The problem
OpenCode silently waits when it needs input, a permission approval, or hits a
question. If the terminal is unfocused — another window, another monitor — you
won’t notice. The model is frozen, and you’re off doing something else, assuming
it’s still working.
The fix
For me, the config file was missing, and there’s no /config or /init command to help set it up.
The thing is that you need to create it by hand and know the exact place and filename in order for it to work.
OpenCode reads a separate config file, ~/.config/opencode/tui.json, with
its own schema (https://opencode.ai/tui.json) — not your main opencode.jsonc.
The attention block controls the alert:
// tui.json
{
"$schema": "https://opencode.ai/tui.json",
"attention": {
"enabled": true,
"notifications": true,
"sound": true,
"volume": 0.8
}
}
So how to fix:
- Create config file
touch ~/.config/opencode/tui.json - Put the config contents from the above
tui.jsoninto the file. - Voila!
Worth noting
OpenCode only alerts when its window is unfocused — by design, so it
doesn’t beep while you’re looking at it. Test by switching away from the
terminal, then triggering a permission prompt or a question. If you’re staring
at it, you won’t hear a thing.Restart OpenCode after creating the file — it’s read at startup, not
hot-reloaded. No config reload, no:restarttrick; kill and relaunch.
