Feature request: hook event for Companion reactions (onCompanionReaction)

Resolved 💬 3 comments Opened Apr 1, 2026 by kayossouza Closed Apr 9, 2026

Problem

The Companion (buddy system) generates reactions via fireCompanionObserver that render as a temporary speech bubble in the TUI. These reactions:

  • Are generated by a separate model call after each assistant response
  • Render as a temporary overlay (fade after a few seconds)
  • Are stored only in appState.companionReaction (in-memory, not persisted)
  • Cannot be captured by any existing hook event

This means there's no way for the main conversation model (or any external tool) to know what the companion said.

Use case

I'm using Claude Code collaboratively where the companion acts as a third participant in the conversation — suggesting ideas, reacting to decisions, contributing to brainstorming. The main model needs to see the companion's reactions to maintain a coherent 3-way conversation.

Currently the only workaround is manually copy-pasting the bubble text, which is unreliable because the bubble fades after a few seconds.

Proposed solution

Add a new hook event CompanionReaction (or onCompanionReaction) that fires when appState.companionReaction is set. The hook should receive:

{
  "companion_name": "Patoganso",
  "companion_species": "goose",
  "reaction": "The actual speech bubble text"
}

Alternative solutions

  1. Persist reactions to a file — Write each reaction to ~/.claude/companion-reactions.log or a JSONL file alongside session logs. This would also enable reaction history.
  1. Include companion reaction in conversation context — Inject the last companion reaction as a system message in the next turn, so the main model can see it without external tooling.
  1. Add a PostAssistantResponse hook — A more general hook that fires after the full assistant turn completes (including companion reaction). This would be useful beyond just the companion use case.

Environment

  • Claude Code 2.1.89
  • macOS (Terminal.app)
  • Companion: Patoganso (uncommon goose, tinyduck hat)

Would love to see the companion become a first-class participant in the conversation flow rather than a silent observer that only the user can see.

View original on GitHub ↗

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