Bug: /buddy generates different companion on Windows vs WSL for same account
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?
Bug: /buddy generates different companion on Windows vs WSL for same account
Environment
- Claude Code version: v2.1.92
- OS: Windows 11 (PowerShell) + WSL2 (Ubuntu)
- Account: Same Claude Max subscription account on both platforms
- Machine: Same physical machine (AMD Threadripper, Windows + WSL2)
Description
Running /buddy on the same account produces completely different companions on Windows (CMD/PowerShell) and WSL2 — different species, different rarity tier, different stats. This contradicts the expected behavior where the buddy is deterministically generated from the user ID and should be identical across platforms.
Probable Cause
Bun.hash() (used in rollCompanionBones) appears to return platform-dependent values for the same input string on Windows vs Linux, breaking the cross-platform determinism of buddy generation.
Additional Context
Both instances are running Claude Code v2.1.92, authenticated with the same Claude Max account, on the same physical machine. The only difference is the runtime environment (Windows native vs WSL2 Linux).
What Should Happen?
Same account should always produce the same buddy (species, rarity, stats), regardless of platform. Per the buddy system design, Bun.hash(userId + salt) should yield identical results.
Actual Behavior
Two completely different companions are generated — different species and different rarity tier. The ~/.claude.json companion data is stored in separate filesystem locations (C:\Users\<user>\.claude.json vs /home/<user>/.claude.json), but the core issue is that the deterministic hash produces different results on Windows vs Linux.
Error Messages/Logs
Steps to Reproduce
- Log in to Claude Code on Windows (PowerShell/CMD) with a Claude Max subscription
- Run
/buddy→ Companion A hatches (species X, rarity Y) - Log in to Claude Code on WSL2 (same machine) with the same account
- Run
/buddy→ Companion B hatches (different species, different rarity)
Claude Model
Not sure / Multiple models
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
v2.1.92
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
WSL (Windows Subsystem for Linux)
Additional Information
<img width="2692" height="422" alt="Image" src="https://github.com/user-attachments/assets/e89bf2e1-4916-491d-ba94-04c5218d3a18" />
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗