[BUG] Bash hook execution triggers HCS sandbox on native Windows, fails with 0x80070569

Resolved 💬 5 comments Opened Feb 4, 2026 by Vanman989 Closed Mar 6, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Problem

On native Windows (not WSL), plugin hooks that use .sh scripts trigger HCS (Hyper-V Host Compute Service) sandbox VM creation, which fails on
corporate/domain-joined machines where Group Policy restricts HCS logon types.

Startup shows:
SessionStart:startup hook error

Debug log:
Using bash path: "C:\Program Files\Git\bin\bash.exe"
...
Hook output does not start with {, treating as plain text
Hook SessionStart:startup (SessionStart) error:
Logon failure: the user has not been granted the requested logon type at this computer.
Error code: Bash/Service/CreateInstance/CreateVm/HCS/0x80070569

Expected Behavior

Per the https://code.claude.com/docs/en/sandboxing, native Windows sandbox support is "planned" but not currently supported. Hook execution on native
Windows should not attempt HCS sandbox VM creation. The bash path is correctly resolved to Git Bash (C:\Program Files\Git\bin\bash.exe), which doesn't
need HCS/WSL.

Actual Behavior

Despite sandboxing not being enabled in settings (no sandbox key in settings.json, default is false), hook bash execution attempts to create an HCS VM,
which fails with 0x80070569 (ERROR_LOGON_TYPE_NOT_GRANTED).

The hook script itself works fine when run directly: bash session-start.sh produces valid JSON output via Git Bash.

Environment

  • Windows 11, domain-joined corporate machine
  • Claude Code v2.1.31
  • WSL2 installed (Ubuntu default distro)
  • Git Bash at C:\Program Files\Git\bin\bash.exe
  • vmcompute service running (restarting it did not fix the issue)
  • sandbox not configured in settings.json
  • Plugin: superpowers v4.1.1 (provides the SessionStart hook)

Reproduction

  1. Install Claude Code on a domain-joined Windows machine with WSL2 installed
  2. Install any plugin with a .sh hook (e.g., superpowers)
  3. Launch Claude Code
  4. Observe SessionStart:startup hook error on startup
  5. Check debug log in ~\.claude\debug\ for the HCS error

Suggested Fix

When running on native Windows with sandbox disabled (or not supported), hook bash execution should use Git Bash directly without the HCS sandbox wrapper.
The sandbox should only activate when explicitly enabled and on supported platforms (macOS, Linux, WSL2).

What Should Happen?

When running on native Windows with sandbox disabled (or not supported), hook bash execution should use Git Bash directly without the HCS sandbox wrapper.
The sandbox should only activate when explicitly enabled and on supported platforms (macOS, Linux, WSL2).

Error Messages/Logs

When running on native Windows with sandbox disabled (or not supported), hook bash execution should use Git Bash directly without the HCS sandbox wrapper.
   The sandbox should only activate when explicitly enabled and on supported platforms (macOS, Linux, WSL2).

Steps to Reproduce

On native Windows (not WSL), plugin hooks that use .sh scripts trigger HCS (Hyper-V Host Compute Service) sandbox VM creation, which fails on
corporate/domain-joined machines where Group Policy restricts HCS logon types.

Startup shows:
SessionStart:startup hook error

Debug log:
Using bash path: "C:\Program Files\Git\bin\bash.exe"
...
Hook output does not start with {, treating as plain text
Hook SessionStart:startup (SessionStart) error:
Logon failure: the user has not been granted the requested logon type at this computer.
Error code: Bash/Service/CreateInstance/CreateVm/HCS/0x80070569

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

v2.1.31

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗