Companion quips are not logged or persisted anywhere

Resolved 💬 3 comments Opened Apr 5, 2026 by Valjoha Closed Apr 8, 2026

Problem

Companion (buddy) speech bubble reactions are ephemeral — they exist only in process memory (capped at ~10 entries for dedup) and are never written to disk. Once the session ends or the buffer rotates, quips are permanently lost.

The --debug buddy flag does not help — the [buddy] debug category only logs API failures ([buddy] api failed: ...), not successful reactions. The session JSONL also does not capture them (#42865 covers the related context-injection angle).

Evidence from source analysis

The buddy_react pipeline:

  1. POST /api/organizations/{orgId}/claude_code/buddy_react is called with personality (truncated to 200 chars), transcript, reason, and recent reactions
  2. Successful response → data.reaction is stored in an in-memory array (used only for dedup via the recent field in subsequent API calls)
  3. The reaction is passed to a React callback that renders the speech bubble
  4. No disk write, no event emission, no log entry

The only log statement in the entire buddy pipeline:

h(`[buddy] api failed: ${z}`, {level:"debug"})

Proposed solution

Log each successful companion reaction to a persistent location. Options (any would work):

  1. Session JSONL — add a companion_reaction event type alongside existing user/assistant messages
  2. Dedicated log file — e.g., ~/.claude/buddy-reactions.jsonl with timestamp, session ID, reason, and reaction text
  3. Debug category — make --debug buddy actually log successful reactions, not just errors

Preferred format:

{"ts":"2026-04-05T10:00:00Z","session":"abc123","reason":"turn","reaction":"hmm, something's off here 👻"}

Why this matters

  • Companion reactions are often insightful (catching bugs, suggesting simplifications) but impossible to review after the fact
  • Users customizing companion personality (via companion.personality) have no way to verify the personality is working correctly across sessions
  • The personality field is silently truncated to 200 characters — without persistent logs, users can't diagnose why their companion ignores personality instructions

Related

  • #42865 — inject companion speech into conversation context (complementary, not duplicate)
  • #43027 — companion language configuration

Environment

  • macOS, Claude Code CLI 2.1.92
  • Companion: ghost named "Shingle"

View original on GitHub ↗

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