Repository navigation
Description
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
- Enable the plannotator plugin in Claude Code.
- Enter plan mode (Shift+Tab) and ask Claude to make a plan.
- 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
ExitPlanModepermission is granted effectively instantly with no UI prompt.- No browser tab opens.
- The plannotator server is running. Confirmed by:
~/.plannotator/sessions/<pid>.jsonis created with a fresh port + URL.- The plan is captured in
~/.plannotator/history/<project>/<title>-<date>/NNN.md. curl -sI http://localhost:<port>/returnsHTTP 200with 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
- Web UI does not open automatically when Plannotator Code Review is triggered #551 — Web UI does not open automatically (closed via fix: non-blocking browser launch in Pi extension (Linux) #292, but later commenters reported the issue still occurring on Mac M4 and
PLANNOTATOR_BROWSERdidn't help; this Windows case looks like the same shape). - Annotate feedback can be lost when submit auto-closes localhost session after CLI timeout on Windows/Codex #678 — Different failure mode (submit-side timeout on Windows/Codex, not open-side).
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 urlOpen the printed URL in a browser. Plan / annotation flow works normally from there.
Notes
- Worked in 0.8.0 (which registered the hook with an absolute exe path and presumably a different open mechanism). 0.19.x regression.
- Have not yet tested
PLANNOTATOR_BROWSER=<full path to chrome.exe>on Windows — the analogous workaround was reported as not-fixing-it in Web UI does not open automatically when Plannotator Code Review is triggered #551. - Happy to test patches against this setup.
Activity
backnotprop commentedon May 13, 2026
Thanks for detailed summary @NotMyself
What terminal environment are you using. powershell?
Are you using
claude agents?NotMyself commentedon May 13, 2026
@backnotprop I use Windows Terminal hosting PowerShell 7 and the native claude code binary. I was using claude agents when the issue happened.
backnotprop commentedon May 13, 2026
There might be some limitations with how they launch sessions with
claude agents, I'm exploring solution pathsNotMyself commentedon May 15, 2026
@backnotprop I did some testing this morning with Claude Code v2.1.142 and Plannotator v0.19.17.
claudeclaude agentsand promoting from the new agents view and waiting on that screenclaude agentsand promoting from the new agents view but immediately switching to that new sessionIt looks like your hunch is correct. The new
claude agentsfeature is the source of the issue. Might require a claude bug report. Happy to test anything else that would be helpful.backnotprop commentedon May 15, 2026
backnotprop commentedon May 16, 2026
#733 and #734 will fix this
backnotprop commentedon May 19, 2026
Good news, contributor found the fix:
#756