claude-code - 💡(How to fix) Fix [BUG] execvpe(/bin/bash) failed warning on Windows with Docker Desktop WSL (no proper WSL distro) [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#47070Fetched 2026-04-13 05:42:16
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×4

Error Message

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

Root Cause

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:

Code Example

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

---

{
  "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}]}]
  }
}
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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}]}]
  }
}

extent analysis

TL;DR

The issue can be fixed by configuring Claude Code to use the native Windows shell for plugin hooks instead of relying on WSL bash.

Guidance

  • Investigate the hooks.json file for the openai-codex plugin to ensure it is correctly configured to use Node directly, as shown in the provided example.
  • Try setting the SHELL environment variable to powershell.exe in the PowerShell session before running Claude Code, using the command $env:SHELL = "powershell.exe".
  • Consider modifying the Claude Code configuration to explicitly specify the shell to use for plugin hooks, although the exact method for this is not specified in the provided information.
  • Verify that the hooks.json file is being used correctly by checking the Claude Code documentation for any specific requirements or restrictions on hook configuration.

Example

No code example is provided, as the issue appears to be related to configuration rather than code.

Notes

The issue may be related to the fact that Docker Desktop's WSL environment does not include a full bash shell, and Claude Code is not correctly falling back to the native Windows shell. The provided hooks.json file appears to be correctly configured, but the issue persists.

Recommendation

Apply a workaround by configuring the SHELL environment variable and verifying the hooks.json file, as the root cause of the issue is not entirely clear and may require further investigation or updates to Claude Code.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] execvpe(/bin/bash) failed warning on Windows with Docker Desktop WSL (no proper WSL distro) [1 participants]