Skip to content

[FEATURE]: Web Push notifications for paired browsers #58428

Open

Description

@Zijian-Wang

Feature hasn't been suggested before.

  • I have verified this feature I'm about to submit hasn't been suggested before.

Describe the enhancement you want to request

Problem

The web app can notify while a tab or installed PWA is open, but not after it is closed or suspended. A session that finishes, asks for permission, or asks a question while the user is away stays silent until they reopen the app. This is most noticeable on phones paired through opencode pair, where the browser tab is usually backgrounded.

Proposal

Add opt-in Web Push from the local OpenCode server to paired browsers:

  • The server stores a VAPID key and one subscription per browser installation, then sends encrypted notifications for session completion, errors, permission requests, and questions.
  • The app registers a small service-worker scope under /push/<server-key>/, so it does not touch the existing offline worker.
  • Settings gets a per-server Enable/Disable control, and the existing notification switches choose which events are pushed.
  • No OpenCode relay or paid infrastructure: the server sends directly to the browser vendor's push service, and payloads omit prompts, code, session titles, errors, and tool output.

Related

#47479 asks for in-app web notifications; #49961 reports the Android PWA bug. This proposal is about background delivery after the app is closed or suspended.

Scope

  • Local server only; it must stay awake and online.
  • iOS/iPadOS requires the app to be installed on the Home Screen.
  • Failed deliveries are not retried.

I have a draft implementation in #58400. I am opening this first to ask whether the approach belongs in core and whether the scope above is acceptable. I will keep the PR as a draft until there is design approval.

Activity

  1. opencode-agent commented on Oct 23, 2026

    @opencode-agent
    Contributor

    Thanks for the detailed proposal and for opening the issue before pushing the PR further. You're asking for opt-in Web Push from the local OpenCode server to paired browsers and installed PWAs. That way, a session that finishes, errors, or asks for permission or a question still notifies you when the tab is closed or in the background, without needing a relay.

    Maintainers will look at the approach and the scope you described. I can't promise when, or what they'll decide.

    Related items:

  2. radres commented on Oct 24, 2026

    @radres

    Give AI your phone number. With the number you get from callmemcp.com we basically support ANY AI agent, from chatgpt dots to claude to grok bot. while this gets designed: for a session that asks a question or needs permission and nobody is at the screen, the agent can ring your iphone instead, no PWA or home screen step. you answer in earbuds or in the car and it gets your words back. paid app, iphone only

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

Metadata

Metadata

Assignees

No one assigned

    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