You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PwshLocator accepts any PATH hit, including the WindowsApps alias stub, and now gates every session launch #104
Found during the pre-release code review of v0.6.0..HEAD. Low severity, but the blast radius grew in #95.
The change in behaviour
Before #95, RunInstance.ResolvePwsh actually ran PowerShell to decide:
Process.Start("pwsh.exe","-NoLogo -NoProfile -Command \"exit 0\"");// cached "pwsh.exe" only if it exited cleanly, else fell back to powershell.exe
PwshLocator replaced that with a where.exe pwsh.exe PATH lookup, for a good reason: the probe paid a full PowerShell startup (hundreds of ms) on a path that runs during session restore, which is what #82 is about.
The trade-off was stated in the code as "a broken-but-on-PATH pwsh surfaces as a failed session rather than a slower launch for everyone."
Why that trade-off is worse than it reads
where.exe proves a name resolves, not that it runs. The common false positive on Windows is a Microsoft Store App Execution Alias stub in %LOCALAPPDATA%\Microsoft\WindowsApps — a zero-byte reparse point that resolves on PATH and fails on execution when the app isn't installed.
And #95 didn't just change the run-command path. PwshLocator now also backs PseudoTerminal.BuildCmdLine, which wraps every non-shell session command. On a machine with that stub, the old code degraded to powershell.exe and everything worked; the new code picks pwsh.exe and every claude session fails to launch.
That is a cliff, not a degradation — and it's silent until someone tries to start a session.
Suggested fix
Keep the fast path, add a cheap sanity check on the resolved path rather than restoring the probe:
where.exe gives the resolved path — check it's a real file with non-zero length (the alias stubs are zero-byte), or check for the reparse-point attribute.
Or: keep where.exe, but fall back to powershell.exe on the first launch failure and remember it, so the cliff self-heals after one bad session instead of persisting for the process lifetime.
Either keeps the startup win from #95 without the failure mode.
Fixed in #105 (merged as cc2e576). PwshLocator.Resolve now reads the resolved path back from where.exe and rejects zero-length or reparse-point hits via IsRunnable, so a Store App Execution Alias stub no longer wins the lookup. 7 tests cover it, including that malformed paths are rejected rather than throwing.
(GitHub only auto-closed #103 from that PR — "Closes #103 and #104" links the first reference only. Closing by hand.)
Activity
perf(layout): skip the grid rebuild when nothing visible changes; har…
AThraen commentedon Aug 27, 2026
Fixed in #105 (merged as cc2e576).
PwshLocator.Resolvenow reads the resolved path back fromwhere.exeand rejects zero-length or reparse-point hits viaIsRunnable, so a Store App Execution Alias stub no longer wins the lookup. 7 tests cover it, including that malformed paths are rejected rather than throwing.(GitHub only auto-closed #103 from that PR — "Closes #103 and #104" links the first reference only. Closing by hand.)
docs: correct and complete CLAUDE.md for the v0.7.0 release (#114)