[FEATURE] Expose companion reaction text via hook event or conversation context
Preflight Checklist
- [x] I have searched existing requests and this hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem
The buddy_react API generates contextual observations server-side, but the text is only rendered as a transient speech bubble and then discarded. The main conversation model never sees it. This means the companion is observing the session, forming opinions, and throwing them away.
Proposed solution
Expose the companion's reaction text to the conversation, either by:
- A new hook event (e.g.
PostCompanionReaction) that fires when a buddy reaction is generated, making the text available to hooks. Related: #42048 - Direct injection into the conversation as soft context (similar to how
system-remindertags work), so the model can consider or discard it naturally
Why: I built a working prototype and the results are surprising
I hacked a workaround using script to capture my companion's italic-formatted speech bubbles from terminal output, then re-inject them via a UserPromptSubmit hook as soft context (e.g. "consider companion's observation: ...").
Across 5 projects and ~53MB of audited transcripts, the companion caught 62+ real errors the main session missed. Data corruption in ML training pipelines, security vulnerabilities in production web apps, stale Docker deployments, API keys nearly committed to git.
The interesting part is how Claude handles it:
- Right observations: Claude acts on them. ~35 led directly to bug fixes
- Wrong observations: Claude dismisses with reasoning and moves on. Zero drift
- Irrelevant observations: Claude silently ignores them
Across all audited interactions, there are zero cases of a bad companion observation misleading the main session. The injection is soft ("consider"), so Claude self-filters without any instruction to do so.
Full evidence report with 28 specific examples is in the comment below.
Why the constraint helps
The companion sees a 5KB transcript window with no tool access and no file reading. That constraint forces pattern-level observation rather than getting lost in implementation details, which is exactly the blind spot the main session has. The companion catches "you skipped verification again" and "tests pass but prod config is untouched" because it's not deep in the code.
Implementation notes
- The
buddy_reactendpoint already returns the reaction text server-side. The data exists - A
PostCompanionReactionhook event would let users opt in without changing default behaviour - Alternatively, injecting reaction text as a low-priority system reminder would require zero user configuration
- My workaround (terminal scraping + italic extraction + debounce) works but is fragile. Native support would be cleaner
Claude Code v2.1.91, companion: Hudlock (robot, common rarity)
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗