Skip to content

STA-3608: hide managed Claude hook consoles on Windows - #13443

Merged
brennanb2025 merged 2 commits into
stablyai:mainfrom
OrcaWin:OrcaWin/sta-3608-windows-repro
Aug 11, 2026
Merged

brennanb2025 merged 2 commits into
stablyai:mainfrom
OrcaWin:OrcaWin/sta-3608-windows-repro

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Aug 10, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Launch managed Claude command hooks on Windows through absolute conhost.exe --headless and cmd.exe /d /c paths so hook processes do not flash console windows.
  • Preserve existing OpenClaude, remote/POSIX hook, and statusline behavior.
  • Recognize the Windows exec-form command when detecting and cleaning up managed hooks.

Reproduction evidence

Before the fix, Claude lifecycle activity produced five bash.exe hook roots beneath ordinary conhost.exe processes, matching the reported visible console flashes. After the fix, all 11 managed hooks were configured in exec form and process tracing showed claude.exe -> conhost.exe --headless -> cmd.exe -> curl.exe, with zero bash.exe hook roots; a deterministic Read(package.json) Claude turn completed with DONE under CDP validation on Windows.

Claude exec-form hook arguments are supported from Claude 2.1.139; the reporter used 2.1.220 and the fix was reproduced with 2.1.223.

Validation

  • Claude hook-service tests: 13 passed
  • Focused installer cleanup/detection tests: 2 passed
  • TypeScript check: passed
  • Changed-file oxlint, including max-lines: passed
  • Electron build: passed
  • Full installer test file: 58 passed, 5 skipped; 3 unrelated Windows symlink EPERM failures
  • Windows Electron/CDP validation: passed, including running and completed-state screenshots and process-start trace

No screenshots or other validation binaries are included in the diff.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: dc8646c6-663c-4478-9822-3677ecefbf4f

📥 Commits

Reviewing files that changed from the base of the PR and between a698bc3 and ececf08.

📒 Files selected for processing (4)
  • src/main/agent-hooks/installer-utils.test.ts
  • src/main/agent-hooks/installer-utils.ts
  • src/main/claude/hook-service.test.ts
  • src/main/claude/hook-settings.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/main/agent-hooks/installer-utils.ts
  • src/main/agent-hooks/installer-utils.test.ts
  • src/main/claude/hook-settings.ts

📝 Walkthrough

Walkthrough

Managed hooks now support optional argument arrays. Detection and removal match managed script paths in command values and arguments. Claude lifecycle hooks use structured configurations, including Windows headless conhost.exe and cmd.exe execution with timeouts. Installation and status checks compare structured hook invocations. Tests cover nested executable hooks, stale hook removal, and Windows argument handling.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the change and validation, but it omits the required AI Review Report, Security Audit, Notes, and Testing checklist sections. Add the required sections and document AI review risks, cross-platform checks, security audit results, platform-specific notes, and each testing checklist result.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: preventing managed Claude hook consoles from appearing on Windows.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@OrcaWin

OrcaWin commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator Author

Windows low-spec Electron QA — PASS (STA-3608 / #13443)

Head: ececf08d9787799cf03c38c973e8a42e7eec2d4c
Env: Windows 11 Pro 10.0.26200 · i7-6700T · 15.89 GiB · Claude Code 2.1.223 · Electron preview + CDP (Orca 1.4.178-rc.2)

Steps

  1. Checkout PR head on OrcaWin/sta-3608-windows-repro
  2. Build electron-vite preview with CDP store exposure
  3. Run Electron/CDP harness: mock Anthropic + real claude -p single Read(package.json) turn + process-start sampler
  4. Assert managed hook install form and process path (no product code changes; no Computer Use)

Result

Check Result
Managed hooks 11/11
Headless form conhost.exe --headless + cmd.exe /d /c 11/11
bash.exe hook roots 0
Observed claude -> conhost -> cmd 5
cmd -> curl posts 3
Turn DONE
Harness verdict PASS

Fixed path: claude.exe -> conhost.exe --headless -> cmd.exe -> curl.exe (no Git Bash hook roots).

Screenshots (uncropped Electron window)

running turn
completed DONE

Evidence

Residual: CDP captures Orca web contents only (not a separate OS console HWND). Process evidence shows hooks use --headless (windowless). No product regression found for the scoped STA-3608 fix.

@brennanb2025
brennanb2025 merged commit f70b52e into stablyai:main Aug 11, 2026
86 of 88 checks passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
* fix(claude): hide managed hook consoles on Windows

* fix(claude): harden managed hook invocation

---------

Co-authored-by: Brennan Benson <79079362+brennanb2025@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants