ralph-wiggum plugin: Hardcoded /bin/bash shebang fails on NixOS

Resolved 💬 3 comments Opened Jan 24, 2026 by jwilger Closed Jan 29, 2026

Description

The ralph-wiggum plugin's stop hook fails on NixOS with the error:

/bin/bash: bad interpreter: No such file or directory

Environment

  • OS: NixOS (Linux 6.18.5)
  • Claude Code: v2.1.19
  • Plugin: ralph-wiggum@claude-code-plugins v1.0.0

Root Cause

The hooks/stop-hook.sh script uses a hardcoded shebang:

#!/bin/bash

On NixOS (and many other modern Linux distributions), bash is not located at /bin/bash. NixOS places all binaries in the Nix store (e.g., /nix/store/...-bash-5.2/bin/bash), and only /bin/sh exists as a compatibility symlink.

Reproduction

  1. Install NixOS
  2. Install Claude Code
  3. Install ralph-wiggum plugin
  4. Start a ralph loop: /ralph-loop
  5. Exit Claude Code
  6. Observe the error in the Stop hook output

Suggested Fix

Change the shebang in hooks/stop-hook.sh from:

#!/bin/bash

To:

#!/usr/bin/env bash

This is the portable solution that works across all Unix-like systems, as it uses the env command (which is always at /usr/bin/env) to locate bash in the user's PATH.

Impact

The plugin's stop hook is completely non-functional on NixOS. The hook fails to execute, preventing the ralph-loop feature from working correctly when exiting sessions.

Additional Note

The same issue may exist in other shell scripts in the codebase. It's worth auditing all *.sh files for hardcoded shebangs like #!/bin/bash, #!/bin/sh, etc.

View original on GitHub ↗

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