[BUG] Buddy persists across account switches — deterministic hash not re-evaluated on account swap
Resolved 💬 3 comments Opened Apr 3, 2026 by welt-moro Closed Apr 3, 2026
Description
When switching Claude Code accounts, the previous account's buddy persists instead of re-generating for the new account. On an account that has never drawn a buddy, a buddy still appears and speaks — carrying over from the previous session's account.
Steps to Reproduce
- Log in as Account A — buddy is drawn and active
- Switch to Account B (which has never drawn a buddy)
- Run
/buddy
Expected Behavior
- Account B should have no buddy (never drawn), or generate a new one based on Account B's
accountUuid + salt → hash - Buddy state should be account-scoped, not local-machine-scoped
Actual Behavior
- Account A's buddy persists on Account B
- The buddy speaks even though Account B never drew one
- Session continuity also seems to carry over (buddy behaves as if it "remembers" the previous session)
Root Cause (suspected)
~/.buddy-companion/state.json is not invalidated on account switch. The deterministic hash (accountUuid + salt → hash → species/rarity) is only evaluated at initial draw time, not re-evaluated when the active account changes.
As the buddy itself put it: "Deterministic hash ignoring account swap."
Related
- #42430 — buddy name/description stale after email change (similar identity mismatch)
- #42894 — buddy changed unexpectedly after update (salt/identity mismatch between versions)
Environment
- macOS
- Claude Code CLI
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗