anomalyco / anomalyco/opencode
[FEATURE]: Add VS Code notifications when an agent completes or needs attention
@Hona is already working on this.
Since Jul 31, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
I found related work for system notifications in the TUI, Desktop app, and CLI, including #7242, #4454, #13334, and #18366.
However, I could not find an existing issue or pull request specifically covering native notifications from the official VS Code extension when an OpenCode session:
- completes,
- requires permission or user input,
- asks a question,
- or encounters an error.
The current request is specifically about subscribing to OpenCode session events from the VS Code extension and surfacing them through the VS Code notification API.
Describe the enhancement
The OpenCode VS Code extension currently does not show a VS Code or operating-system notification when an agent:
- finishes a response or task,
- requests permission or user input,
- encounters an error.
This makes long-running sessions difficult to follow when the user switches to another VS Code tab or application.
Proposed behavior
Add optional VS Code notifications for:
- Agent/session completion
- Permission or question requests
- Session errors
A notification could include an action such as Open OpenCode, which focuses the related OpenCode terminal.
Notifications should be configurable and disabled individually if necessary.
For example:
{
"opencode.notifications.completed": true,
"opencode.notifications.attention": true,
"opencode.notifications.errors": true
}
To avoid unnecessary interruptions, completion notifications could only be displayed when the OpenCode terminal is not currently focused.
Implementation idea
The extension already starts an OpenCode server on a local port. It could subscribe to the server's session event stream and use the VS Code notification API when a relevant session event is received.
The implementation should:
- prevent duplicate notifications,
- associate notifications with the correct session or terminal,
- dispose event subscriptions when the terminal or extension closes,
- avoid notifying for sessions that were not started by the current VS Code window.
I would be interested in implementing this after receiving feedback on the expected behavior and architecture.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.