What Is Claude Code's /buddy? The AI Pet Living in Your Terminal¶
For / Key Points
For: Claude Code users wondering what /buddy is. Those thinking "A pet? In a coding tool? Really?"
Key Points:
/buddyis a terminal-resident AI companion that watches your work and reacts — a second pair of eyes- Each buddy is deterministically generated from your user ID, giving everyone a unique character
- The feature's internals were revealed by a source code leak the day before its April 1 activation
Don't Close This Tab Just Because Someone Said "Tamagotchi"¶
On April 1, 2026, a /buddy command appeared in Claude Code. Run it, and a small ASCII art character shows up next to your input prompt. It has a name. A personality. It reacts while you work.
"A pet in a coding tool? Are they serious?" — a fair reaction. But this feature is not what it looks like at first glance. Let me walk you through it.
What Actually Happens¶
When you run /buddy for the first time, a "hatching" animation plays. The character that emerges is automatically determined by your user ID. You don't get to choose. It looks random, like a gacha pull, but running it again on the same account always produces the same result1.
After hatching, you're assigned:
- Species (18 types): duck, dragon, axolotl, capybara, mushroom, robot, and more
- Rarity: Common (60%) → Uncommon (25%) → Rare (10%) → Epic (4%) → Legendary (1%)
- 5 stats: DEBUGGING, PATIENCE, CHAOS, WISDOM, SNARK
- Appearance: 6 eye styles, 7 hats (some unlocked by rarity)
- Shiny roll: A separate 1% chance for a shiny variant, independent of rarity
Claude also generates a "soul" on first hatch — a short text describing the character's name and personality that drives all subsequent behavior.
Here's what it looks like in practice:
╭──────────────────────────────────────╮
│ │
│ ★ COMMON ROBOT │
│ │
│ .[||]. │
│ [ ✦ ✦ ] │
│ [ ==== ] │
│ `------´ │
│ │
│ Rindbot │
│ │
│ "A methodical, almost serene │
│ debugger that trusts the process │
│ and never doubts your logic—it │
│ just quietly points out where the │
│ null pointer is hiding with the │
│ patience of a stone watching │
│ rust." │
│ │
│ DEBUGGING █░░░░░░░░░ 9 │
│ PATIENCE ██░░░░░░░░ 20 │
│ CHAOS ░░░░░░░░░░ 1 │
│ WISDOM ████████░░ 81 │
│ SNARK █░░░░░░░░░ 5 │
│ │
╰──────────────────────────────────────╯
In this example, a Common Robot species named "Rindbot" has hatched. WISDOM is extremely high at 81, CHAOS is just 1. The soul text matches — "the patience of a stone watching rust" while it quietly finds your null pointers.
The stats are random, but Claude generates the personality description to be consistent with those stats.
So What Does It Actually Do?¶
This is the key part. Buddy watches your coding session from the sideline.
Specifically, it does the following:
- Sits next to your input prompt with a 3-frame idle animation
- Watches your conversation with Claude and reacts via speech bubbles
- Responds when you call it by name (as a separate persona from Claude)
/buddy petlets you pat it (hearts float up)/buddy offhides it
Here's an easy-to-miss detail: according to the leaked code analysis, Buddy reactions are designed not to count toward your usage1. This hasn't been officially confirmed, but if accurate, you could leave it on without worrying about Pro/Max plan consumption.
Buddy is not Claude itself. Claude's system prompt explicitly states that "Buddy is a separate entity and is not you (Claude)"1. While Claude handles your work, Buddy independently chimes in from the side.
Why Does a Coding Tool Need This?¶
Not because it's cute. The design intent breaks down into three angles.
1. Reducing psychological load during long sessions
Working with Claude Code means staring at a terminal and typing text for extended periods. Especially during long agent-mode tasks, the screen shows nothing but scrolling logs, and moments for human intervention shrink. Buddy's reactions ease this sense of working in a void. It's close to the "someone is watching" feeling you get during pair programming.
2. Increasing tool retention
A system where your unique character grows gives users a reason to come back. In game design, this is known as the "endowment effect." If your Buddy turns out to be Legendary or Shiny, that alone becomes a conversation starter. Right after the leak, social media was already buzzing with "What did you get?"
3. Experimenting with AI persona separation
The technically interesting aspect is running a separate persona from Claude within the same context. Buddy has its own system prompt and reacts with its own personality. A main AI agent (Claude) coexisting with a sub-character (Buddy) in one session can be read as a prototype for future multi-agent experiences.
The Technical Mechanism: Why You Can't Choose¶
Buddy species are deterministically generated from a hash of your user ID. Internally, it uses Mulberry32, a 32-bit pseudo-random number generator, seeded from the string userId + 'friend-2026-401'1.
The same user always gets the same Buddy. Even if you edit config files to fake your rarity, the visual appearance is recalculated from the hash every time, making it pointless. Only the name and personality (soul) are stored locally.
This "you don't get to choose" design leverages psychological effects proven by NFTs and social games. A random assignment strengthens the sense of ownership — "this one is mine" — which evolves into attachment.
Some may think of "rerolling" — creating a new account with a different email to get a different user ID. In theory, this works. But Claude Code requires at least a Pro plan ($20/month)2, and free-tier users can't access it. Unlike mobile gacha games where you can reroll endlessly for free, the barrier here is high.
An unofficial tool (any-buddy) that patches the salt string in the binary to select any Buddy has also been published. This blog does not cover its setup steps in detail.
Timeline: Why It Appeared Today¶
The /buddy feature became widely known through the Claude Code source code leak on March 31, 2026. The npm-published package included source map files, exposing 512,000 lines of TypeScript source3.
A buddy/ directory was found in the code, gated behind a BUDDY compile flag as an unreleased feature. The code indicated April 1-7 as a teaser period, with full launch in May1.
The sequence: leak → code analysis reveals Buddy → the next day (4/1) it activates as scheduled. The April Fools' timing is deliberate, but this is not a throwaway joke — it's designed as a permanent feature that persists beyond the teaser period.
Quick Reference¶
| Command | Action |
|---|---|
/buddy | Show Buddy (hatching animation on first run) |
/buddy pet | Pet it (hearts float up) |
/buddy off | Hide it |
| Call Buddy by name | Direct conversation (responds as a separate persona from Claude) |
According to the leaked code, Buddy reactions are designed not to count toward usage (not officially confirmed). If you don't want it, /buddy off makes it disappear.
Summary¶
/buddy defies its "pet in a coding tool" first impression. It's a feature where user retention, psychological support, and persona separation experiments converge. It will divide opinions, but in 2026's AI coding landscape — where hours-long agent sessions are becoming routine — the idea of "another presence beside your work" makes more sense than it sounds.
The details of this feature came to light through the previous day's massive source code leak. The leak itself exposed numerous other unreleased features (KAIROS, Undercover Mode, etc.) beyond Buddy, which we plan to cover in a separate article.
Related Articles¶
- Claude Code Reference Guide
- Claude Code Custom Slash Commands Design Guide
- Claude Code Best Practices
- What Is Anthropic Managed Agents? Brain/Hands/Session Separation Explained
Discovered in the
buddy/directory of Claude Code source code (leaked via npm source maps on March 31, 2026). Includes Mulberry32 PRNG seed values, species list, rarity probabilities, and companion system prompt specifications. Anthropic subsequently updated the npm package and removed the source maps. ↩↩↩↩↩Claude Code Pricing - SSD Nodes. Free-tier users cannot access Claude Code. At minimum, a Pro plan ($20/month) or API credits are required. ↩
Anthropic's Claude Code source appears to have been leaked via npm registry map file - Piunikaweb. Discovered and published by security researcher Chaofan Shou on March 31. Contained 512,000 lines of TypeScript source. ↩