Skip to content

[FEATURE]: Remote approval of permission requests from mobile / second device #39628

Description

@yukihamada

Feature hasn't been suggested before.

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

Describe the enhancement you want to request

Problem

Long-running sessions frequently block on permission prompts (file edits, bash commands, MCP calls). If the user steps away from the terminal, the session stalls until they return. The desktop app improved local UX, but there is still no way to approve a pending permission request from a phone or a second machine.

Proposal

Allow a pending permission request to be approved remotely:

  1. Server: when a permission prompt is pending, expose it via the existing headless server (opencode serve) event stream with a unique approval ID and a short-lived, single-use approval token.
  2. Optionally show a QR code / short URL in the TUI when a prompt appears (e.g. https://<host>:<port>/approve/<token>), so the user can scan it with a phone on the same network.
  3. The approval page is a minimal, local-only web view: shows the exact action (command / diff) and Approve / Deny buttons. No cloud relay required for the basic version — LAN/Tailscale only.
  4. Security: token is single-use, expires with the prompt, and the server binds to localhost by default (opt-in --host for LAN). Approval requires the token, so port scanning alone is not enough.

Benefits

  • Unblocks human-in-the-loop workflows when away from the desk.
  • Fits the existing headless-server architecture; no new daemon.
  • Opt-in and local-first, so the security surface stays small.

Out of scope (first iteration)

  • Cloud relay / push notifications.
  • Approving from a different user account.

Happy to implement this if the core team agrees with the direction.

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