Repository navigation
Backlog
Labels
Description
Parent
What to build
On Windows the hook records claude.exe as the session's agent, and concurrent hooks of one session never fail on the record's lock.
- The parent pid on Windows comes from a Toolhelp snapshot. In exec form the parent is
claude.exe. inspectgains a Windows arm (parent pid and full image path throughQueryFullProcessImageNameW).is_shellsplits on\and/, strips.execase-insensitively, and knowspwsh,powershellandcmd.agent_pidskips a run of shells, at most three, on every platform.in_applearns VS Code's and Cursor's Windows install folders.- The session records' locks in
turns/: on Windows the prune'sremove_fileof a lock another hook holds leaves it delete-pending, and a third hook's open fails with access denied. Make a hook never fail on that: a short retry of the open, or a prune that leaves the lock to the session's end; say which and why in the PR.
Acceptance criteria
-
hook/tests/pid.rsrows on every CI with the injectedinspect: exec form, the Git Bash chainbash.exe > bash.exe > claude.exe, two Unix shells. - The parent pid canary (
the_logged_line_carries_the_parent_pid_or_the_wrappers) runs on Windows. - A Windows-job test of hooks racing a prune over one turn lock: every hook writes its record.
-
docs/studio/behaviour/sessions.mdnotes the walk past up to three shells. - Each Windows-only test row is shown red (an assertion failure), then green, on Windows runs of this ticket's own pushed
issue-*branch, x64 and arm64; Daniel approves the push when auto mode stops it (Spec: Windows Phase 1 — Claude Code recorded on native Windows, x64 and arm64 #936 breakdown, Q41; the rule is indocs/agents/issue-tracker.mdonce 01 lands). Both run links are in the PR. -
npm run checkandnpm run check:windowspass.
Reading
- Spec: Windows Phase 1 — Claude Code recorded on native Windows, x64 and arm64 #936: the spec. Its Implementation Decisions and Testing Decisions settle the design; its "Made without Daniel" points to the grilling's decisions (Q10–Q41).
- Spec: Windows Phase 1 — Claude Code recorded on native Windows, x64 and arm64 #936, "The hook on Windows" (Parent pid, The walk, the session records' locks).
local-evidence/2026-11-30-windows-port-grilling/(Daniel's machine):spike2/RESULTS.mdand the site reports inreports/behind every figure in Spec: Windows Phase 1 — Claude Code recorded on native Windows, x64 and arm64 #936.
Touches
- Files:
hook/src/main.rs,hook/src/lib.rs,hook/tests/pid.rs,hook/tests/prune.rs,hook/tests/turns.rs,docs/studio/behaviour/sessions.md - Session: auto mode
- Route: strong · effort high — concurrency: hooks racing a prune on one lock file
Activity