Files
orca/src
Merge Sim b22379bde6 fix(hooks): stop the Windows hook payload consuming its own stdin
On Windows PowerShell 5.1, Set-ExecutionPolicy takes a host confirmation path
even with -Force -ErrorAction SilentlyContinue. With stdin redirected — how
every agent delivers hook JSON — that prompt consumes the payload and echoes it
to stdout, so the agent rejects the hook output as malformed JSON and the script
behind it reads empty stdin.

Emit the bypass only for a payload that runs a .ps1. Copilot ships the only
managed .ps1 hook and still needs it under a locked-down policy; every other
hook is a .cmd, which execution policy does not govern.

The launch shape is unchanged by construction, and a test pins that: the shape
was chosen by AV measurement at CreateProcess, so it may only change alongside a
new measurement.
2026-09-07 02:18:18 -07:00
..