Skip to content

mobile push: desktop-off wake needs a hosted relay #115

Open

Description

@gsvprharsha

The Expo push wiring added in ec6e0b9 fires when a session transitions to waiting, but the desktop is the sender - so pushes only reach the phone while the desktop process is running.

The gap

  • Phone backgrounded, desktop running -> push fires
  • Phone backgrounded, desktop off / laptop asleep -> nothing fires

Any real "drive it from anywhere" story needs the second case to work. Right now the app tagline (Agentic engineering on the go) is only true while the laptop is awake and Tempest is running.

What has to change

To fire pushes when the desktop is off, we need something persistent between agent and phone. Options:

  1. Hosted relay - small service that holds registered tokens per pairing, receives push requests from the desktop over a persistent connection while it is alive, and holds queued events when it is not. Conflicts with the Vercel OSS "no hosted paid infra" constraint unless we self-host / make it BYOK.
  2. Desktop-as-daemon - keep Tempest running headless when the laptop sleeps. macOS Power Nap / Windows modern standby. Fragile, platform-specific, does not help when the laptop is actually off.
  3. Agent-side webhook - teach the agent runners (Claude Code, Codex, etc.) to POST to Expo Push directly on tool-approval. Skips desktop involvement for the push itself but requires per-agent hook plumbing.

Option 1 is the honest fix. Design constraints: BYOK-friendly (Vercel OSS rule), no per-user cost, minimal server surface. A Cloudflare Worker + KV would fit.

Current ceiling in code

  • src/lib/mobileBridge/pushSender.ts - token store + Expo Push POST, module-scoped, only reachable while attachBridge is live.
  • src/lib/mobileBridge/bridge.ts - waiting transition trigger inside the coalesced flush; dies with the peer / desktop.
  • apps/mobile/lib/push.js - token registration is fine as-is; no changes needed on the phone for a future relay.

Related

  • Memory: project_vercel_oss.md - no paid features, no hosted paid infra, BYOK
  • Memory: project_mobile_sprint.md - mobile follow-up polish is active focus

Activity

  1. self-assigned this
    on Sep 16, 2026
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