claude-code - 💡(How to fix) Fix [BUG] Branched session re-renders prior slash command invocations as raw <command-message>/<command-name> XML tags

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

After running /branch, slash commands from the pre-branch portion of the conversation re-render as raw XML tags (<command-message>...</command-message> <command-name>/...</command-name>) instead of as a styled command chip. The (Branch) label next to the command renders correctly.

Root Cause

After running /branch, slash commands from the pre-branch portion of the conversation re-render as raw XML tags (<command-message>...</command-message> <command-name>/...</command-name>) instead of as a styled command chip. The (Branch) label next to the command renders correctly.

RAW_BUFFERClick to expand / collapse

Summary

After running /branch, slash commands from the pre-branch portion of the conversation re-render as raw XML tags (<command-message>...</command-message> <command-name>/...</command-name>) instead of as a styled command chip. The (Branch) label next to the command renders correctly.

Environment

  • Claude Code: 2.1.139
  • OS: CachyOS Linux (Arch-based), kernel 7.0.5-2-cachyos
  • WM: Hyprland (Wayland)
  • Terminal: Ghostty 1.3.1-arch2.2 (TERM=xterm-ghostty, COLORTERM=truecolor)
  • Shell: fish

Repro

  1. In a session, invoke any slash command (e.g. /statusline). It renders as a chip.
  2. Run /branch to fork the conversation.
  3. In the new branched session, scroll up to the earlier /statusline turn.

Expected: command still rendered as a styled chip with (Branch) indicator. Actual: command shows as literal <command-message>statusline</command-message> <command-name>/statusline</command-name> (Branch).

Screenshot

To be attached after issue creation.

Notes

  • New slash commands invoked after the branch still render correctly.
  • Only the replayed pre-branch turns are affected.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING