Skip to content

[Bug]: Muse hooks on Windows start powershell.exe -EncodedCommand on every event before checking whether Orca is listening #26717

Closed

Description

@MitchellkellerLG

Operating system

Windows

Orca version

1.4.222

Details

Orca installs Muse hooks (~/.orca/agent-hooks/muse-hooks.json) for 11 events: SessionStart, SubagentStart, SessionEnd, Notification, UserPromptSubmit, PreToolUse, PostToolUse, PostToolUseFailure, PermissionRequest, Stop, StopFailure. Each entry is:

C:/WINDOWS/System32/WindowsPowerShell/v1.0/powershell.exe -NoProfile -EncodedCommand <...>

Decoded, the script sets the process execution policy, then runs ~/.orca/agent-hooks/muse-hook.cmd if it exists; only when the shim is missing does it check ORCA_AGENT_HOOK_PORT, ORCA_AGENT_HOOK_TOKEN and ORCA_PANE_KEY and exit 0. So every Muse event, including Muse runs started outside Orca, costs cmd.exe -> powershell.exe -> cmd.exe (the shim) -> curl.exe. PowerShell 5.1 cold start alone is a few hundred ms, more under antivirus.

A 64 s process trace on a busy machine showed 26 cmd.exe /C powershell.exe -NoProfile -EncodedCommand ... starts from the Muse binary and 14 muse-hook.cmd starts from PowerShell.

Expected: the same treatment PR #15520 gave the Antigravity hook (and #18875 covered for the Claude hook): call the .cmd shim directly, have the shim post with curl.exe, and exit early in the shim when the ORCA_* variables are absent. No PowerShell on the hot path.

Activity

  1. nwparker commented on Oct 9, 2026

    @nwparker
    Contributor

    Closing in favor of #26755, which has passed Windows verification and CI and is awaiting merge. Thanks @1aifanatic for #26734; Naveen Chatlapalli is included as a co-author. Paths needing special quoting still use the existing compatibility fallback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions