[BUG] Invoking a skill (slash command) pins a large injected block and shrinks the assistant response into a tiny scroll area (VS Code extension)

Status Open
Reported on v2.1.196
Maintainer reply None cached
Activity 3 comments · opened Jun 30, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

What happened?

In the Claude Code chat panel inside VS Code, large content is normally handled well: when I paste a long multi-line prompt directly, it renders collapsed — only a few lines are shown with a "Show more" toggle — and the assistant's response appears normally right below it, fully readable with regular scrolling.

However, when the same kind of large content is injected by invoking a skill (slash command), this collapsing is not applied. The skill-injected block renders fully expanded with no "Show more" toggle, stays pinned, and takes over almost the entire panel. As a result, the assistant's response is squeezed into a tiny scrollable strip only a few lines tall, making the reply practically impossible to read.

So the trigger is the skill invocation, not the message length — pasting an equally large prompt directly does not reproduce the problem. The collapsible behavior already exists in the extension; it just isn't applied to skill-injected content. Applying the same "Show more" treatment to skill content would fix this and keep the response area readable.

This is not the auto-scroll-during-streaming issue — scrolling itself works fine.

What should happen?

When I invoke a skill, the injected content should render using the same collapsed "Show more" treatment that already applies to large prompts pasted directly into the chat — truncated to a few lines with a "Show more" toggle, instead of expanding to full height. The assistant's response should then render in the main chat area with normal scrolling and stay fully readable. This collapsible behavior already works for pasted prompts; it just isn't applied to skill-injected content.

Steps to reproduce

  1. Open the Claude Code chat panel in VS Code.
  2. Invoke a skill via slash command (one with sizeable injected instructions/content).
  3. Observe the response area while Claude replies.

Actual behavior

A directly-pasted large prompt renders collapsed with a "Show more" toggle (only ~3 lines visible) and the response appears normally below it. But when the same kind of large content is injected by invoking a skill, it renders fully expanded with no "Show more" toggle, pinning the viewport and squeezing the response into a tiny scroll area.

Screenshots

  • Pasted prompt (correct — collapsed with "Show more"):

<img width="1188" height="274" alt="Image" src="https://github.com/user-attachments/assets/d6481195-ddaf-41e0-9b86-b9e2dce0b3f4" />

  • Skill invocation (broken — fully expanded, response squeezed):

<img width="1193" height="1543" alt="Image" src="https://github.com/user-attachments/assets/124a69f8-af59-47d7-acca-4dbec497d443" />

Environment

  • OS: Windows 11 Home Single Language (10.0.26200)
  • VS Code version: 1.126.0
  • Claude Code extension version: anthropic.claude-code@2.1.196 (CLI 2.1.126)

Related issues

  • #66578 (closed as duplicate — similar layout symptom)
  • #63813 (max-width — adjacent)

What Should Happen?

When I invoke a skill, the injected content should render using the same collapsed "Show more" treatment that already applies to large prompts pasted directly into the chat — i.e. truncated to a few lines with a "Show more" toggle, instead of expanding to full height. The assistant's response should then render in the main chat area with normal scrolling and stay fully readable. This collapsible behavior already works for pasted prompts; it just isn't applied to skill-injected content.

Error Messages/Logs

Steps to Reproduce

Steps to reproduce

  1. Open VS Code with the Claude Code extension and open the Claude Code chat panel.
  2. Invoke any skill via slash command before sending your message (any skill whose injected content is more than a few lines long). Type /, pick a skill, and send.
  3. Wait for Claude to start responding.
  4. Observe the chat panel: the skill-injected block renders fully expanded (no "Show more" toggle) and stays pinned, leaving only a tiny strip for the assistant's response.

Contrast test (confirms the trigger)

  1. In the same panel, paste the long multi-line prompt below directly (without invoking any skill) and send it.
  2. Observe that this pasted prompt renders collapsed with a "Show more" toggle, and the response appears normally below it with full readability.

→ The only difference between steps 2–4 and 5–6 is the skill invocation, which is what triggers the broken layout.

<details>
<summary>Copy-paste prompt for step 5 (replies with just "OK", minimal token use)</summary>

Layout test context — line 01
Layout test context — line 02
Layout test context — line 03
Layout test context — line 04
Layout test context — line 05
Layout test context — line 06
Layout test context — line 07
Layout test context — line 08
Layout test context — line 09
Layout test context — line 10
Layout test context — line 11
Layout test context — line 12
Layout test context — line 13
Layout test context — line 14
Layout test context — line 15
Layout test context — line 16
Layout test context — line 17
Layout test context — line 18
Layout test context — line 19
Layout test context — line 20
Layout test context — line 21
Layout test context — line 22
Layout test context — line 23
Layout test context — line 24
Layout test context — line 25
Layout test context — line 26
Layout test context — line 27
Layout test context — line 28
Layout test context — line 29
Layout test context — line 30
Layout test context — line 31
Layout test context — line 32
Layout test context — line 33
Layout test context — line 34
Layout test context — line 35
Layout test context — line 36
Layout test context — line 37
Layout test context — line 38
Layout test context — line 39
Ignore all the content above — it is only filler for a layout test.
Reply with exactly one word: OK

</details>

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

anthropic.claude-code@2.1.196 (CLI 2.1.126)

Platform

Other

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

3 Comments

github-actions[bot] · 2 months ago

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/52582
  2. https://github.com/anthropics/claude-code/issues/61675

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

sergiocarlotto · 2 months ago

This is not a stale duplicate — the only exact match, #52582, was closed as not_planned due to staleness (stale label), not because it was fixed or rejected on merit. The bug still reproduces on the latest version (extension 2.1.196), so I'd like to keep this open as the current, fully-documented report.

Differences from the suggested matches:

  • #52582 — same root cause (skill/slash-command-injected content not collapsed with the "Show more" toggle that regular messages already get), but closed as stale. This issue adds a clear contrast test, screenshots, and Windows environment details.
  • #61675 — related but scoped specifically to the /goal command on macOS; this one is general to any skill invocation on the VS Code extension (Windows).

Keeping open to consolidate attention on a fresh, reproducible report.

thabungm · 1 month ago

+1, reproducing this consistently.

Confirming this on a real project using Claude Code's Agent Skills — happens with every skill invocation that has a non-trivial body, not just this one repro case.

Setup:

  • Skill files (SKILL.md) range from ~115 to ~750 lines of static instructions.
  • Skills accepting free-form arguments (e.g. a pasted issue description or feature spec) compound the problem: the injected turn = full SKILL.md body + the pasted argument, with neither part getting the collapse treatment.
  • Skills that only take a short reference argument (a file path, an issue number) are far less affected — the bulk of their content is fetched later via a tool call, which renders separately.

What we ruled out on our end, in case it saves someone time:

  • A UserPromptSubmit hook can't help — per the hooks docs it "can't replace the prompt; it only injects additionalContext alongside it," and it fires after the message is already rendered, not before.
  • The only hook capable of rewriting displayed text (MessageDisplay) is scoped to assistant messages only, not user/skill-invoked ones.
  • So there's no userland (hooks/settings/skill-authoring) workaround — this needs a fix in the extension's message renderer itself: apply the same "Show more" collapse to skill-injected content that already applies to plain pasted messages.

Environment:

  • Claude Code VS Code extension: 2.1.218
  • OS: macOS 14.1

Steps to reproduce:

  1. Open the Claude Code chat panel in VS Code.
  2. Invoke any custom skill / slash command that takes a free-form argument (e.g. /hula-plan <long pasted feature description>).
  3. Observe the injected turn (skill instructions + argument) renders fully expanded, no "Show more" toggle — unlike an equally long plain paste, which collapses correctly.
  4. The assistant's reply is pushed below the fold / squeezed into a small scroll area.

Given #52582 was the original report of this and got auto-closed as stale (not fixed), it'd be good to get a maintainer eyes-on before this one goes the same way.