opencode icon indicating copy to clipboard operation
opencode copied to clipboard

[feature request] notifications

Open akuuly-7 opened this issue 1 year ago • 7 comments

Leaving it here, because it sounded really interesting - heard there were notifications upon the agent waiting for further input and/or finishing the task in Claude Code (and maybe Codex)

It's really not a priority, but sounded cool to have :)

akuuly-7 avatar Jun 19 '25 21:06 akuuly-7

@thdxr this will be on the TS side, lmk if you still want me taking this on or not

adamdotdevin avatar Jun 20 '25 13:06 adamdotdevin

This seems to already be available using the experimental.hook.session_completed config option? You can add a command there that sends a notification (e.g. notify-send on Linux).

But you guys put it under "experimental" and I'm not that sure what that means.

tamirzb avatar Jul 15 '25 09:07 tamirzb

@tamirzb could you expand on this? I can't seem to find this option anywhere?

rohitsathish avatar Sep 02 '25 06:09 rohitsathish

@rohitsathish They changed the config since I posted this. Although I believe these days it could be done using a plugin, the plugins page in the docs even gives a specific example about this.

tamirzb avatar Sep 03 '25 04:09 tamirzb

Yes! This can be done with a plugin. Here's the one I'm using: https://github.com/berenar/dotfiles/blob/main/opencode/.config/opencode/plugin/notification.ts FYI: It only triggers if kitty (my terminal) is in the background

berenar avatar Oct 27 '25 07:10 berenar

Most notification plugins only support macOS, and not linux (i tried to create one as well, and failed)

because if i understand it right, it's pretty hard to listen to focus-in/focus-out events via plugins, We need the focus-related code inside opencode itself, or opencode should expose some events to plugins for this

I'm talking about: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html

echo -ne '\e[?1004h' and echo -ne '\e[?1004l'

TheHamkerCat avatar Jan 28 '26 22:01 TheHamkerCat

To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

github-actions[bot] avatar Mar 30 '26 03:03 github-actions[bot]