Skip to content

Web UI does not open after ExitPlanMode on Windows + Claude Code (0.19.15) — server runs, plan captured #724

Closed

Description

@NotMyself

Description

On Windows with Claude Code, the PermissionRequest:ExitPlanMode hook fires correctly and the Plannotator server starts on a random port — but the browser tab never auto-opens, so the user sees no UI and the plan-mode permission appears to be granted without review.

Structurally this looks like the same class of bug as #551 (closed; OpenCode + Linux + xdg-open), but with cmd.exe /c start ${url} failing silently in the Claude Code hook subprocess context on Windows.

Environment

OS Windows 11 Pro 10.0.26200
Agent Claude Code 2.1.140
Plannotator 0.19.15 (plugin); bun 1.3.11 (binary)
Default browser Microsoft Edge
Install /plugin install plannotator@plannotator (user scope)

Steps to reproduce

  1. Enable the plannotator plugin in Claude Code.
  2. Enter plan mode (Shift+Tab) and ask Claude to make a plan.
  3. Wait for the model to call ExitPlanMode.

Expected behavior

Browser tab auto-opens at http://localhost:<random> showing the plan UI for annotation/approval.

Actual behavior

  • ExitPlanMode permission is granted effectively instantly with no UI prompt.
  • No browser tab opens.
  • The plannotator server is running. Confirmed by:
    • ~/.plannotator/sessions/<pid>.json is created with a fresh port + URL.
    • The plan is captured in ~/.plannotator/history/<project>/<title>-<date>/NNN.md.
    • curl -sI http://localhost:<port>/ returns HTTP 200 with the expected ~17 MB HTML payload — the UI is reachable, just never opened.

So the hook works end-to-end except for openBrowser().

Root cause hypothesis

In packages/server/browser.ts:

if (platform === "win32" || wsl) {
  await $`cmd.exe /c start ${url}`.quiet();
}

Wrapped in try/catch with .quiet(). When this fails in the Claude Code hook subprocess context — likely the same "child process can't reach the interactive desktop / env not propagated" mode that #551 hit on Linux/OpenCode — the failure is swallowed and only the VS Code IPC fallback is attempted. On a non-VS-Code Claude Code install there's no IPC registry to fall back to, so the user sees nothing.

(Bun's shell template-tag $ interpolation may also be a factor — possible URL escaping/splitting that confuses cmd.exe start — but I haven't verified that vs. the subprocess-context theory.)

Related

Workaround (interactive)

The UI is reachable; you can open it manually:

Get-Content ~/.plannotator/sessions/*.json |
  ConvertFrom-Json |
  Sort-Object startedAt |
  Select-Object -Last 1 -ExpandProperty url

Open the printed URL in a browser. Plan / annotation flow works normally from there.

Notes

Activity

  1. backnotprop commented on May 13, 2026

    @backnotprop
    Owner

    Thanks for detailed summary @NotMyself

    What terminal environment are you using. powershell?

    Are you using claude agents?

  2. NotMyself commented on May 13, 2026

    @NotMyself
    Author

    @backnotprop I use Windows Terminal hosting PowerShell 7 and the native claude code binary. I was using claude agents when the issue happened.

  3. backnotprop commented on May 13, 2026

    @backnotprop
    Owner

    There might be some limitations with how they launch sessions with claude agents, I'm exploring solution paths

  4. NotMyself commented on May 15, 2026

    @NotMyself
    Author

    @backnotprop I did some testing this morning with Claude Code v2.1.142 and Plannotator v0.19.17.

    1. Starting claude with claude
      • Plannotator behaves as expected.
    2. Starting claude with claude agents and promoting from the new agents view and waiting on that screen
      • Plannotator does not trigger. The plan is written to the session and claude waits for approval.
    3. Starting with claude agents and promoting from the new agents view but immediately switching to that new session
      • Plannotator does not trigger. Same behavior as 2.

    It looks like your hunch is correct. The new claude agents feature is the source of the issue. Might require a claude bug report. Happy to test anything else that would be helpful.

  5. backnotprop commented on May 15, 2026

    @backnotprop
    Owner
  6. backnotprop commented on May 16, 2026

    @backnotprop
    Owner

    #733 and #734 will fix this

  7. backnotprop commented on May 19, 2026

    @backnotprop
    Owner

    Good news, contributor found the fix:
    #756

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