/insights output leaks literal <message> tags into rendered response

Open 💬 0 comments Opened Jun 26, 2026 by zizhong

What happened

Running /insights produces a final assistant message that contains literal <message> and </message> tags in the rendered terminal output:

❯ /insights
  ⎿  1 skill available

● <message>
  Your shareable insights report is ready:
  file:///home/.../usage-data/report-2026-06-26-174401.html

  Want to dig into any section or try one of the suggestions?
  </message>

The <message>...</message> wrapper is an internal instruction artifact — the skill/prompt tells the model to "Output the text between <message> tags verbatim as your entire response." The intent is for only the contents to be shown, but the tags themselves are being emitted to the user, so they leak into the displayed response.

What I expected

Only the inner content should be displayed, with the wrapper tags stripped:

● Your shareable insights report is ready:
  file:///home/.../usage-data/report-2026-06-26-174401.html

  Want to dig into any section or try one of the suggestions?

Likely cause

The /insights skill instructs the model to reproduce a block "verbatim" while wrapping the desired output in <message> tags. "Verbatim" is ambiguous: it can be read as "emit these exact characters including the tags." Either the prompt should instruct the model to emit only the inner text (drop the wrapper), or the client should strip a leading/trailing <message>/</message> wrapper before rendering.

Repro

  1. Run /insights in a project with enough session history to generate a report.
  2. Observe the final message includes literal <message> / </message> tags.

Environment

  • Claude Code CLI
  • Model: Claude Opus 4.8 (1M context)
  • Platform: Linux

View original on GitHub ↗