Skip to content

Remote and multi-session session router: URL surfacing, decision receipt, and host launch behavior #899

Not planned

Description

@backnotprop

Provenance stamp: This issue was triaged on June 13, 2026 as part of the older-than-two-month GitHub issue triage exercise.

Source issues: #102, #154, #158, #192, #518

Summary

Several old issues point at the same underlying problem: Plannotator still needs a dependable session router for users who run multiple agent sessions, remote sessions, non-interactive commands, or host environments that cannot open a normal browser tab.

The common requirement is not only "open a URL." The requirement is that the right plan or review session is visible, reachable, and connected back to the agent process that is waiting for the user's decision.

What the source issues requested

Triage determination

These are one product area. Treating them separately would lead to partial fixes that help one host but leave the core session-lifecycle problem intact. The replacement issue should track a router-level design that covers local, remote, multi-session, and host-specific launch behavior.

Acceptance criteria

  • One long-lived Plannotator runtime can host multiple active plan, review, and annotate sessions.
  • Each session has a stable identity that includes enough context to prevent approving the wrong waiting agent process.
  • Remote sessions expose a usable URL through the best available host channel.
  • A browser decision returns a clear receipt such as applied to waiting session, stale plan, or session no longer waiting.
  • Non-TTY and skill-launched commands expose a useful URL instead of silently relying on browser launch.
  • Repeated plans from the same agent session update or replace the prior waiting session instead of opening confusing duplicate views.
  • Host launch policy is explicit for browser, Glimpse, VS Code, cmux, SSH, headless, and no-browser environments.
  • The old source issues can be closed after this issue is created and their specific requirements are represented here.

Notes

Related implementation work already exists around the daemon and router. This issue should stay focused on the user-visible contract and decision handoff, not on preserving any particular internal server shape.

Activity

  1. added
    triage
    on Jun 13, 2026
  2. TheRealAlexV commented on Sep 18, 2026

    @TheRealAlexV
    Contributor

    Sharing a working external approach to the session-router problem, plus a small PR that removes one of its blockers.

    What I built (external, works today):

    I run the @plannotator/opencode plugin on a headless workstation reached through a reverse proxy (OAuth at the edge). The pieces:

    1. Port range — PLANNOTATOR_PORT=19432-19463, so concurrent reviews each bind the next free port.
    2. Port-indexed subdomains — nginx maps p<port>.plan.<domain> → workstation:<port>. Because Plannotator serves root-relative /api/*, a subpath proxy is a dead end; varying the hostname gives each session its own origin with no rewriting. One wildcard DNS record plus a certificate covering the port-subdomains.
    3. A tiny hub — a service scans the range, GET /api/plan for live sessions, and lists them (project / title / mode) with a link to each p<port> origin. Control-plane only; nginx owns the data path, so a hub outage never interrupts an in-flight review.
    4. Everything sits behind one OAuth gate.

    Blocker I hit: the embedded runtime never registers a session (only the compiled CLI does), so external discovery has to port-scan. #1567 makes embedded sessions register, keyed by <pid>-<port> so concurrent in-process sessions stay distinct.

    Caveats / open bits:

    This is a workaround that stays entirely outside core, not a claim against the router design here — but it covers the same user-visible contract (list active sessions, stable per-session identity, remote-reachable URL, decision returns to the waiting agent).

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

    triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions