Files
orca/docs/reference
d68a5be13a fix(claude): run Windows hooks without shell operators (#23944)
* fix(claude): run Windows hooks without shell operators

Keep neutral replies inside the managed entry and payload scripts, repair missing files from managed registrations, and stop using Git Bash discovery to guess Claude's hook shell.

Co-authored-by: latte271 <junghyeyun27@gmail.com>
Co-authored-by: Bing.Z <zzb@gxsmjx.com>

* fix(claude): keep the Windows hook refresh async and its scripts after uninstall

- List windows-hook-files.ts in the CLI project so typecheck passes.
- Refresh the entry/payload pair only from a surviving entry, with an async
  existence check, so startup refresh stays off the main thread on Windows.
- Keep both scripts on uninstall like every other agent; a Claude session
  still holding old settings keeps answering instead of erroring per event.
- A payload that exists but cannot start falls through to the neutral reply,
  and the missing-payload branch exits early for background jobs.
- Update the EDR posture reference for the operator-free command.

* test(claude): run the Windows hook host legs for real

The live Windows host legs never ran: runProcessSync cannot take a string
stdin (it forces encoding 'buffer'), so every leg threw before starting a
host. Use async runProcess, pass PATHEXT (without it Windows PowerShell 5.1
prints nothing and exits 0 for a .cmd path), and name the host in each
assertion. Drop the POSIX pwsh leg: its drive-mapping shim proved nothing
about Windows, and the Windows legs cover both PowerShell hosts.

---------

Co-authored-by: latte271 <junghyeyun27@gmail.com>
Co-authored-by: Bing.Z <zzb@gxsmjx.com>
2026-09-30 01:07:09 -07:00
..