Repository navigation
Backlog
Labels
Description
Parent
What to build
On Windows a session ends when its agent's process is gone, a reused pid doesn't keep it open, and a resumed session isn't ended by mistake. Replaces 01's always-alive arm.
pid_alivegains a Windows arm:OpenProcessandWaitForSingleObject(h, 0), access denied counting as alive.- The time the session's current pid was first seen is kept beside
session.pidin memory, rebuilt by the replay; no new stored field. On Windows the read loop's end check also requires the process to have started before that time (GetProcessTimes), so a reused pid ends the session and aclaude --resume(newclaude.exe, same session id) does not. agy_version()does not ask a login shell on Windows (it sharesread_loop.rs).
Acceptance criteria
- Rows: a resumed session whose newer pid started after the session's first event stays alive; a pid whose process started after it was first seen ends the session.
- A Windows-job test of
pid_alivefor a live, an exited and an inaccessible process. -
docs/studio/behaviour/sessions.mdsays how a Windows session ends. - 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" (Is the agent alive).
Touches
- Files:
hook/src/sys.rs,core/src/studio/take.rs,core/src/studio/replay.rs,server/src/session_view.rs,server/src/read_loop.rs,server/tests/read_loop.rs,docs/studio/behaviour/sessions.md - Session: auto mode
- Route: strong · effort high — persistence: the end check appends end events to the log; an untested edge case: real pid reuse, which tests only simulate
Activity