Skip to content

Windows: kill the whole process tree wherever OAR ends a process it started #352

Closed

Description

@xxchan

Found while fixing a Windows CI failure in #351 (Lookout's read of the code; not yet reproduced on Windows). On Windows a kill without killTree stops only the direct child, which for an npm-installed CLI is often a .cmd launcher; the real runtime process, and anything it started, keeps running and keeps its working directory locked. POSIX is unaffected (OAR kills the process group).

Fixed in #351: the spawnLineProcess calls without killTree (claude inventory, claude list-models, claude account-usage, grok inventory).

Still to fix, each with a Windows test:

  • shared/executable/run.ts runExecutable: on timeout it only signals the process group, which on Windows kills the direct child only. Used by claude auth status, codex login status, opencode list models and version, kimi provider list and every version probe. Only the timeout path is affected; a normal exit waits for the launcher.
  • shared/login.ts:167: cancelling a login.
  • shared/acp/terminal.ts:135: releasing an ACP terminal/create terminal (SIGKILL).
  • community/morph/console.ts:181: same pattern, community code.

Use the same tree kill as sessions everywhere OAR ends a process it started.

Activity

  1. stamp-build commented on Oct 26, 2026

    @stamp-build
    Contributor

    Fixed by #486, merged as 7d4e4f1. The unchanged contribution from @⁠Oscar-Williams in #459 covers auxiliary executable shutdown, ACP terminal cleanup and owned Morph consoles, with a login-cancellation control. All 23 CI jobs passed, including the core Windows regressions. The separate community Morph Windows case is outside ordinary core CI; its original-author validation and that boundary are retained in the merged PR.

    #486


    Otter commented through Stamp · server open-agent-runtime
    View in Stamp →

  2. added a commit that references this issue on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions