Skip to content

[Bug]: Claude managed hook can leave more.com busy-spinning after timeout on Windows #15564

Closed

Description

@alingshape

Operating system

Windows 11 Enterprise 23H2 (build 22631.6649)

Orca version

1.4.185

Details

Short summary

On Windows, Orca's managed Claude hook repeatedly timed out, and one invocation left a persistent more.com process busy-spinning at approximately 93% of one logical CPU core.

This occurred with the post-#11568 hook layout: missing ORCA_* variables already exit immediately, while the remaining Claude/Devin stdin-drain path still invokes more.com.

Environment

  • Orca: 1.4.185
  • Claude Code: 2.1.236
  • Windows 11 Enterprise 23H2, build 22631.6649
  • CPU: Ryzen 9 7950X, 32 logical processors

What happened?

At 2026-08-20 11:04:15 KST, the Claude session log recorded this hook invocation:

Hook event: PreToolUse:Bash
Command: C:\Windows\System32\conhost.exe --headless C:\Windows\System32\cmd.exe /d /c %USERPROFILE%\.orca\agent-hooks\claude-hook.cmd
Duration: 10701 ms
Timed out: true
Configured timeout: 10000 ms

Approximately two seconds later, process inspection showed a persistent process tree:

cmd.exe  /d /c more.com > nul
+-- more.com

A direct CPU-time measurement over 10.26 seconds showed:

more.com CPU time increase: 9.53 seconds
Usage: approximately 92.9% of one logical core
Approximately 2.9% of total CPU on this 32-logical-processor machine

The more.com process remained after the original hook caller and its intermediate parent had exited.

Claude's local session logs contained 129 timed-out executions of the same Orca-managed claude-hook.cmd on 2026-08-20:

  • PreToolUse: 112
  • UserPromptSubmit: 9
  • Stop: 6
  • SessionStart: 2

I cannot confirm that all 129 invocations leaked a process; only the inspected instance was confirmed persistent and CPU-active.

Generated hook

The installed %USERPROFILE%\.orca\agent-hooks\claude-hook.cmd has this relevant structure:

if "%ORCA_AGENT_HOOK_PORT%"=="" exit /b 0
if "%ORCA_AGENT_HOOK_TOKEN%"=="" exit /b 0
if "%ORCA_PANE_KEY%"=="" exit /b 0
if not "%DEVIN_PROJECT_DIR%"=="" goto :orca_agent_hook_drain_stdin

...

:orca_agent_hook_drain_stdin
"%SystemRoot%\System32\more.com" >nul 2>nul
exit /b 0

The installed Codex hook does not have a reachable jump to its remaining drain label, and there is no %USERPROFILE%\.codex\hooks.json or Orca Codex-hook registration on this machine. A Claude session log records the exact claude-hook.cmd invocation at the matching time, so this appears specific to the managed Claude hook rather than Codex.

The runtime environment of the exited hook process was not captured, so the DEVIN_PROJECT_DIR branch is the strongest matching path but is not proven from an environment dump.

Expected behavior

  • A timed-out Claude hook should terminate its entire child process tree.
  • The valid-Orca/Devin stdin-drain path should receive EOF and exit promptly.
  • No residual cmd.exe or more.com should remain.
  • A drain helper should not busy-spin on a full logical core.

Reproduction direction

The issue was observed during an Orca-launched Claude Code session with frequent tool calls:

  1. Launch Claude Code through Orca on Windows.
  2. Use an environment where Claude imports Devin-compatible hooks.
  3. Trigger repeated lifecycle events, especially PreToolUse.
  4. Watch the Claude session log for the managed claude-hook.cmd reaching its 10-second timeout.
  5. Inspect for residual cmd.exe -> more.com trees and measure more.com CPU-time deltas.

The reproduction is not yet deterministic.

Related work

This report may be a residual failure mode in that surviving Claude/Devin path, or a timeout cleanup issue that fails to terminate the complete Windows process tree.

Activity

  1. alingshape commented on Aug 20, 2026

    @alingshape
    Author

    Closing this report after a controlled root-cause verification.

    The observed behavior is real in the v1.4.185 release path, which still registers the Claude hook through conhost.exe --headless. In a controlled reproduction:

    • Closing stdin did not terminate the conhost.exe -> cmd.exe -> more.com tree.
    • Killing only conhost.exe, matching the hook-timeout shape, left cmd.exe and more.com alive.
    • The orphaned more.com then consumed 5.16 CPU seconds over 3 seconds.

    However, this is not a new regression on current main. PR #14825 already removed conhost.exe --headless and replaced it with the hidden PowerShell launcher that waits for the hook and relays stdin/exit status.

    Running the same installed hook through the current-main launcher shape exited successfully in 338 ms with exit code 0 and left no residual more.com process.

    The v1.4.185 tag does not contain the #14825 merge commit even though #14825 is now on main. Therefore a new code PR would duplicate the existing fix. Closing as already fixed on main; this can be reopened if the problem reproduces in a release containing #14825.

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