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
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
Description
On Windows with Claude Code, the
PermissionRequest:ExitPlanModehook 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 withcmd.exe /c start ${url}failing silently in the Claude Code hook subprocess context on Windows.Environment
/plugin install plannotator@plannotator(user scope)Steps to reproduce
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.~/.plannotator/sessions/<pid>.jsonis created with a fresh port + URL.~/.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:Wrapped in
try/catchwith.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 confusescmd.exe start— but I haven't verified that vs. the subprocess-context theory.)Related
PLANNOTATOR_BROWSERdidn't help; this Windows case looks like the same shape).Workaround (interactive)
The UI is reachable; you can open it manually:
Open the printed URL in a browser. Plan / annotation flow works normally from there.
Notes
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.