Skip to content

Studio: Windows — replacing and removing a running hook (#936) #944

Backlog

Description

@danielrispler

Parent

#936

What to build

An upgrade or uninstall works on Windows while a hook is running.

  • The Windows arm of hook_copies::replace moves the current copy aside to <name>.old-<n>.exe (a running .exe can be renamed, not replaced) and puts the new one at the stable path, one binary at a time as the Unix arm does. Each start deletes .old-* copies, leaving any still running. install is no longer stopped by a running hook.
  • Uninstall's Windows arm removes what it can, moves a running copy aside, and names what is left to delete once its session ends, instead of stopping with "could not remove".

Acceptance criteria

  • Windows-job tests with a running copy: replace succeeds and the new copy is at the stable path; a start deletes a stopped .old-* and keeps a running one; uninstall finishes and names the leftover.
  • 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 in docs/agents/issue-tracker.md once 01 lands). Both run links are in the PR.
  • npm run check and npm run check:windows pass.

Reading

Touches

  • Files: server/src/hook_copies.rs, server/src/install.rs, server/tests/hook_copies.rs, server/tests/install.rs
  • Session: auto mode
  • Route: strong · effort high — concurrency with running processes, and an untested edge case: Defender's scan of fresh .exes on the runner

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentwindows

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions