[BUG] execvpe(/bin/bash) failed warning on Windows with Docker Desktop WSL (no proper WSL distro)

Resolved 💬 2 comments Opened Apr 12, 2026 by adarshnb618 Closed May 23, 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?

When running Claude Code natively on Windows PowerShell with Docker Desktop installed (but no Ubuntu or other WSL distro), a non-blocking WSL error appears on every session start and after every Claude response. The error is triggered by the openai-codex plugin hooks trying to execute via WSL bash, which doesn't exist in Docker Desktop's minimal Linux environment.

What Should Happen?

When Claude Code is running natively on Windows PowerShell and SHELL is explicitly set to powershell.exe in settings, plugin hooks should execute via the configured Windows shell (PowerShell or Node directly) without routing through WSL. If WSL bash is unavailable, Claude Code should gracefully fall back to the native Windows shell instead of throwing repeated errors.

Error Messages/Logs

SessionStart: startup hook error
Failed with non-blocking status code: <3>WSL (12 - Relay) ERROR:
CreateProcessCommon:800: execvpe(/bin/bash) failed: No such file or directory

Stop hook error: Failed with non-blocking status code: <3>WSL (9 - Relay) ERROR:
CreateProcessCommon:800: execvpe(/bin/bash) failed: No such file or directory

Steps to Reproduce

Have a Windows machine with Docker Desktop installed (Docker Desktop creates a minimal WSL environment that does not include /bin/bash) Do NOT have Ubuntu or any other full WSL distro installed Install Claude Code globally via npm install -g @anthropic-ai/claude-code Install the openai-codex plugin from the marketplace Run claude from PowerShell Send any message Observe the WSL bash error appearing after every response and on session start

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.104

Platform

AWS Bedrock

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

What was investigated and tried:

The hooks.json for the codex plugin correctly uses node directly (not bash), but Claude Code still routes hook execution through WSL when WSL is detected on the system Setting "SHELL": "powershell.exe" in both global ~/.claude/settings.json and project-level settings.local.json had no effect on hook routing Docker Desktop's WSL uses BusyBox sh — creating a /bin/bash shim or symlink fails because BusyBox does not include a bash applet Disabling the codex plugin entirely removes the warning but also removes all code review functionality The hooks.json content for reference:
{
  "hooks": {
    "SessionStart": [{"hooks": [{"type": "command", "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/session-lifecycle-hook.mjs\" SessionStart", "timeout": 5}]}],
    "Stop": [{"hooks": [{"type": "command", "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/stop-review-gate-hook.mjs\"", "timeout": 900}]}]
  }
}

View original on GitHub ↗

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