#97469·Claude Code

[BUG] VS Code extension: slash-command messages never collapse, so long /command arguments fill the chat panel

Author: devhindoCreated Sep 26, 2026Updated Oct 2, 2026
Labelsbughas reproplatform:vscodearea:ui

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet. The closest is #61675 (same symptom, reported for /goal), which was auto-closed as stale on 2026-09-24 with a request to open a new issue if still relevant.
  • This is a single bug report
  • I am using the latest version of Claude Code

What's Wrong?

In the VS Code extension, a user message that starts with / is always rendered at full height. This covers built-in and custom slash commands with arguments. Plain user messages fold to 60 px with a "Show more" button, but slash-command messages never fold. A custom command whose argument is a pasted code block fills the whole chat panel, and Claude's reply is pushed out of view.

Root cause, from the shipped bundle (webview/index.js, 2.1.283): in the user-message renderer's case "text" branch, slash-command messages return a plain div:

javascript
case "text":
  if (g.isSlashCommand)
    return F("div", { className: `${h0.userMessage} ${h0.slashCommandMessage}`, children: g.text }, i);

Every other user message goes through the collapsible component:

javascript
F(qH0, { content: M[i] ?? a, context: Y, maxHeight: 60 })

isSlashCommand is text.startsWith("/"), computed after <command-name> and <command-args> are joined. That means the bug affects every command that takes arguments, not only /goal.

What Should Happen?

Slash-command messages should fold like other long user messages: capped at the same max height, with Show more / Show less.

Suggested fix (untested): in that branch, wrap the text in the same component and keep the monospace class on the outer div:

javascript
children: F(qH0, { content: g.text, context: Y, maxHeight: 60 })

Error Messages/Logs

None. This is a rendering issue.

Steps to Reproduce

  1. Create .claude/commands/echo.md containing the single line Input: $ARGUMENTS.
  2. In the VS Code extension chat, send /echo followed by about 30 lines of text (for example, a pasted function).
  3. The message renders at full height with no Show more control.
  4. Send the same 30 lines without the leading /. It folds to about 3 lines, with Show more on hover.

Claude Model

Opus

Is this a regression?

I don't know

Claude Code Version

2.1.283 (Claude Code); VS Code extension anthropic.claude-code 2.1.283

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux (Ubuntu 24.04.5 LTS)

Terminal/Shell

Other: the VS Code extension's native chat panel (VS Code 1.139.0), not a terminal

Additional Information

  • Related: #61675. Comments there report the same thing for other long prompts in the VS Code extension.
  • No claudeCode.* setting controls this.
  • The minified names (qH0, h0, F) come from the 2.1.283 bundle and will differ in other builds.