Skip to content

Per-turn <!-- buddy: --> comment now renders visibly in Claude Code v2.1.169+ #124

Description

@k-g-j

Summary

As of Claude Code v2.1.169/v2.1.170, the per-turn <!-- buddy: ... --> comment is now rendered visibly in the chat transcript instead of being hidden. The plugin's whole design assumes Claude Code hides HTML comments in rendered markdown (hooks/buddy-comment.sh even documents this: "The HTML comment is invisible in rendered markdown output."). That assumption no longer holds, so every turn leaks a raw <!-- buddy: ... --> line into the conversation.

The status line itself still works — the Stop hook scrapes the comment correctly. Only the source comment, which used to be invisible, is now shown.

Repro

  1. Install claude-buddy v0.5.2, run on Claude Code v2.1.170.
  2. Have any normal exchange.
  3. Each assistant turn ends with a visible line like:
<!-- buddy: *slow blink* the void was never meant to be seen in plain text -->

It also appears under /buddy skill calls, so it's not tied to a specific message type.

Root cause

Two pieces, neither broken individually:

  • server/index.ts (lines ~113–118 and ~1304–1324) instructs the model to append <!-- buddy: [reaction] --> at the end of every response.
  • Claude Code's transcript renderer used to strip HTML comments and now prints them literally.

The Stop hook (hooks/buddy-comment.sh) runs after the message is already on screen, so it can't strip anything — it can only read the comment for the status line.

Suggested fix

Stop relying on the renderer hiding a model-authored comment. The Stop hook already receives last_assistant_message, and the plugin already has a reaction/context system. Move reaction selection into the hook (derive it from the message content / existing reaction contexts) and drop the "append an invisible HTML comment" instruction from server/index.ts entirely. No comment authored → nothing to leak → per-turn status-line reactions keep working independent of how Claude Code renders comments.

If keeping model-authored reactions is preferred, an interim option is gating the instruction behind a config flag (default off) so users can opt out without losing the buddy.

Workaround for now

/buddy mute (or buddy_mute) stops the leak but also drops per-turn reactions, since the comment is the only thing feeding them.

Env

  • claude-buddy v0.5.2
  • Claude Code v2.1.170 (also seen on v2.1.169)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions