Skip to content

Comments

fix(ralph-wiggum): Windows 11 compatibility for stop-hook.sh#127

Open
oinani0721 wants to merge 1 commit intoanthropics:mainfrom
oinani0721:oinani0721-patch-1
Open

fix(ralph-wiggum): Windows 11 compatibility for stop-hook.sh#127
oinani0721 wants to merge 1 commit intoanthropics:mainfrom
oinani0721:oinani0721-patch-1

Conversation

@oinani0721
Copy link

Summary

  • Add PATH fix for Git Bash subprocess environment on Windows
  • Add UTF-8 encoding exports for non-ASCII paths (Chinese characters)
  • Extract cwd from hook input and use absolute paths
  • Add cygpath normalization for Windows paths
  • Change rm to rm -f to avoid race condition errors
  • Fix output to stderr with exit code 2

Problem

Ralph Wiggum plugin fails on Windows 11 with multiple issues documented in #16377

Test plan

  • Tested on Windows 11 with Git Bash
  • Ralph loop iteration 1 â�� 2 â�� 3 â�� normal exit works
  • Non-ASCII paths (Chinese characters) work correctly

Related: anthropics/claude-code#16377

@oinani0721
Copy link
Author

Additional Findings After Initial PR

After more testing, I discovered additional issues and solutions that complement this PR:

🔍 New Discovery: Plugin Cache Conflict

Even with this fix applied to the plugin source, outdated cached versions can override the fix!

Claude Code caches plugin files in multiple locations:

  • ~/.claude/plugins/cache/claude-plugins-official/ralph-wiggum/
  • ~/.claude/plugins/marketplaces/*/plugins/ralph-wiggum/

Workaround for users: Delete cached directories to force reload:

Remove-Item -Recurse -Force "$env:USERPROFILE\.claude\plugins\cache\*\ralph-wiggum" -ErrorAction SilentlyContinue
Remove-Item -Recurse -Force "$env:USERPROFILE\.claude\plugins\marketplaces\*\plugins\ralph-wiggum" -ErrorAction SilentlyContinue

📋 Complete Windows 11 Setup Checklist

For users to get ralph-wiggum working on Windows 11, they need:

  1. This PR merged (fixes the stop-hook.sh script)
  2. Environment variable set:
    CLAUDE_CODE_GIT_BASH_PATH=C:\Program Files\Git\bin\bash.exe
    
  3. Clear plugin cache (see workaround above)
  4. Restart Claude Code

🔗 Related Issues

I've posted detailed solutions in these Claude Code issues:

✅ Verified Working

Tested on Windows 11 23H2:

  • ralph-loop iteration: ✅ Works (1/2 → 2/2 → complete)
  • Non-ASCII paths: ✅ Works (Chinese characters in path)
  • Stop hook execution: ✅ Silent (no script content displayed)

@Unic-hou
Copy link

Thank you . i resolve this problem.

@reisen7
Copy link

reisen7 commented Feb 3, 2026

perfect fix,love u

@MithrilMind
Copy link

A month in, still waiting. Can we nudge the Claude team

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants