Skip to content

[FEATURE]: Add VS Code notifications when an agent completes or needs attention #39936

Closed as not planned

Description

@aerenkaradag

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:

  1. Agent/session completion
  2. Permission or question requests
  3. 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.

Activity

  1. github-actions commented on Jul 31, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. aerenkaradag commented on Jul 31, 2026

    @aerenkaradag
    Author

    Yes, #28175 is closely related. Is there any update on or ongoing work for the background-session notifications discussed there? If that work does not also cover the official VS Code extension, I’m happy to keep this issue focused specifically on the extension-level notification layer and coordinate with the shared event-subscription work.

  3. febergs commented on Aug 3, 2026

    @febergs

    Can attest: This would help me a lot in my workflow.

    Workflow:
    I usually run 2–3 VS Code windows with concurrent opencode sessions in each one, and the per-window focus is exactly the part that matters.

    EDIT: In fact, I eventually even built a custom hook to solve it via macOS script editor, because I wanted the feature so much

  4. aerenkaradag commented on Aug 11, 2026

    @aerenkaradag
    Author

    Seems like quite a few people in the community are really looking forward to this one. @Hona , any update on where things stand with the feature?

  5. Udayakumarg commented on Aug 21, 2026

    @Udayakumarg

    @Hona

    This would be a really useful UX improvement for running OpenCode agents in the background, especially when a session completes or needs attention.

    Do you have any updates on this, or is there currently any workaround to get notifications for these events?

    It would be great to see this picked up.

  6. github-actions commented on Oct 21, 2026

    @github-actions
    Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions