[BUG] First user message stays pinned/sticky at the top of the chat panel in VS Code extension

Open 💬 26 comments Opened Mar 19, 2026 by francisco-robles-kuik

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?

Since a recent update, the first user message in a conversation remains pinned (sticky) at the top of the VS Code chat panel. It stays visible at all times regardless of how far the conversation progresses, permanently taking up screen real estate and reducing the visible area for the actual ongoing exchange.

Actual behavior

The first user message is permanently anchored at the top of the panel. It never scrolls out of view, no matter how many messages are exchanged. There is no visible setting to disable this behavior.

What Should Happen?

The first message should scroll away with the rest of the conversation history, like every other message.

Error Messages/Logs

Steps to Reproduce

Steps to reproduce

  1. Open Claude Code in VS Code (webview panel, not terminal mode)
  2. Start a new conversation and send any message
  3. Continue the conversation with several exchanges
  4. Scroll through the conversation — the first message remains stuck at the top

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.79

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

Environment

  • Claude Code VS Code extension: 2.1.79 (pre-release)
  • Claude Code CLI: 2.1.72
  • VS Code: 1.110.1 (61b3d0ab13be7dda2389f1d3e60a119c7f660cc3)
  • Electron: 39.6.0
  • Chromium: 142.0.7444.265
  • Node.js: 22.22.0
  • OS: Linux x64 6.17.0-19-generic

Additional context

  • There does not appear to be any extension setting to toggle this behavior
  • If this is intentional, a setting to disable it would be appreciated

View original on GitHub ↗

26 Comments

kevinneub · 3 months ago

This would be helpful. Options to display x lines of the prompt would be good as well. 0 = don't display at all. In a few seldom cases that initial prompt can severely reduce the scrolling actions area.

Ezbeat · 3 months ago

This is causing me a lot of inconvenience, and I believe it's a bug.
Since the sticky-top feature has its advantages, it would be nice if it could be toggled on and off.

rankengine · 3 months ago

yes. Having same issue. With a long initial prompt, makes it where I can't see any of the underlying activity happening as it is all blocked by the initial message.

A hack to be able to see in this case is for me to shrink text on VSCode.

yusuf-q · 3 months ago

This is painfully inconvenient. If you type up a very long prompt, more than 60% of your screen height is taken up by it in VSC.

stivluc · 3 months ago

Any updates on this? Anyone found a workaround?

NME-64 · 3 months ago

At your own risk, try this.

sed -i '' 's/position:sticky/position:relative/' ~/.vscode/extensions/anthropic.claude-code-2.1.81-darwin-arm64/webview/index.css

It worked for me (ironically enough my Claude Code came up with this). Just make sure you save the original file somewhere safe, so you can always restore it.

And obviously you might want to change the path to the extension depending your OS, version of the extension and way you installed it.

intelemodelseth · 3 months ago

This is a super annoying bug/feature. Please allow this to be disabled.

jinxed84 · 3 months ago

its really simple, just make the pinned msgs have a carrot to collapse/expand it.

intelemodelseth · 3 months ago

Can we get an update on when this sticky behavior will become optional so it can be disabled? This is seriously slowing down work

senyaak · 3 months ago

I did some research. made claude code fix claude code :D

Toggleable Sticky Last Message

Problem

In the Claude Code VSCode extension chat UI, the last user message is always pinned (sticky) at the top of the viewport when scrolling. This behavior is hardcoded and cannot be disabled.

Root Cause

In webview/index.js, the stickyMode CSS class is unconditionally applied to the messages container:

// Current code (in the chat component render):
className=`${G2.messagesContainer} ${G2.stickyMode} ${window.IS_FULL_EDITOR ? G2.fullEditor : ""} ...`

The CSS for this feature lives in webview/index.css under classes stickyMode_* and stickyHeader_*.

Proposed Fix

1. package.json — add new setting:

"claudeCode.stickyLastMessage": {
  "type": "boolean",
  "default": true,
  "description": "Pin the last user message at the top of the viewport when scrolling through the conversation."
}

2. extension.js — read setting and pass to webview (inside getHtmlForWebview):

// Add alongside existing config reads:
const stickyLastMessage = vscode.workspace
  .getConfiguration("claudeCode")
  .get("stickyLastMessage", true);

Then in the <script> block next to the existing window.IS_* variables:

<script nonce="${nonce}">
  window.IS_SIDEBAR = ${isSidebar ? "true" : "false"}
  window.IS_FULL_EDITOR = ${isFullEditor ? "true" : "false"}
  window.IS_SESSION_LIST_ONLY = ${isSessionListOnly ? "true" : "false"}
  window.STICKY_LAST_MESSAGE = ${stickyLastMessage ? "true" : "false"}  <!-- ADD THIS -->
</script>

3. webview/index.js — make stickyMode conditional:

// Before:
className=`${G2.messagesContainer} ${G2.stickyMode} ${window.IS_FULL_EDITOR ? G2.fullEditor : ""} ...`

// After:
className=`${G2.messagesContainer} ${window.STICKY_LAST_MESSAGE !== false ? G2.stickyMode : ""} ${window.IS_FULL_EDITOR ? G2.fullEditor : ""} ...`

Notes

  • The pattern for passing boolean flags via window.* variables from extension.jswebview/index.js is already established (IS_SIDEBAR, IS_FULL_EDITOR, IS_SESSION_LIST_ONLY)
  • Default true preserves existing behavior for all current users
  • Setting can be changed via VSCode's settings UI or settings.json

would be nice if some contibutor could fix it :)

HeapCreep · 2 months ago

Same repro on darwin-arm64, extension 2.1.119.

Selector (current build): .message_<hash>.stickyHeader_<hash> in webview/index.css. Class-name hashes are CSS-module-generated and re-roll per build, but the stickyHeader_ prefix has been stable across 2.1.79 → 2.1.119.

Example rule body:

.message_07S1Yg.stickyHeader_07S1Yg {
  position: sticky;
  z-index: 2;
  background-image: linear-gradient(to bottom, var(--sticky-bg) calc(100% - 12px), transparent 100%),
                    linear-gradient(to bottom, var(--app-secondary-background) calc(100% - 12px), transparent 100%);
  /* ... */
}

Why it's a real problem, not just visual clutter: when the first message is long (multi-paragraph initial prompt, pasted logs, stack traces), the sticky header occupies 50–80% of the chat viewport and hides the rest of the conversation. The panel is effectively unusable for the session. Cursor — same VSCode webview substrate — doesn't exhibit this, confirming it's the extension's own CSS, not a platform issue.

Webview CSS workaround — append to <extension-root>/webview/index.css, then reload the window:

[class*="stickyHeader_"] { position: static !important; background: none !important; }

Attribute-prefix selector survives hash re-rolls. Auto-wiped on extension update (new versioned dir), so needs reapplying — a small launchd WatchPaths agent / shell hook on ~/.vscode/extensions handles this cleanly.

Feature-request-ish: if the sticky header is intentional for short first messages, a setting like claude-code.chat.stickyFirstMessage: "auto" | "always" | "never" (with "auto" hiding stickiness past some viewport-% threshold) would keep the ergonomic win without the pathological long-prompt case.

ShmidtS · 2 months ago

Experiencing the same issue on Windows 11.

Environment:

  • Claude Code VS Code extension: 2.1.101 (pre-release)
  • VS Code: 1.114.0 (x64)
  • OS: Windows 11 Pro 10.0.26200

Reproduction:

  1. Open Claude Code panel in VS Code
  2. Send a long initial prompt (e.g. 30+ lines with task description, context, instructions)
  3. The pinned prompt covers the entire chat viewport
  4. Scrolling does not dismiss it — responses are hidden behind the overlay
  5. Only workaround is to full-screen the panel or manually scroll past the pinned area

Impact: When the initial prompt is long (structured task briefs, multi-step plans), the pinned overlay makes the chat effectively unusable — you cannot read Claude's responses without fighting the UI.

+1 for either: collapsible chevron, max-height with internal scroll, auto-collapse after first response, or a setting to disable pinning entirely.

max-midved · 2 months ago

Please fix, very annoying bug, that is easy to fix.

yummydsky · 2 months ago

Please fix it, I can not see any response from Claude when I prompt more than 30 lines.

jonathan-nielsen · 2 months ago

Added a long prompt, this is what i see on a 1440p monitor with full view/height expanded.

<img width="1328" height="316" alt="Image" src="https://github.com/user-attachments/assets/fe3a2dff-2b63-40cb-93e8-657bb4d57bf8" />

mattschmitter · 2 months ago

Not the best, but my current workaround is to /remote-control then open the conversation in the Claude mobile or desktop app since they collapse that first message well.

missionseo · 2 months ago

This bug suddenly started appearing on my desktop version. PLEASE FIX ANTHROPIC!

BrennonEH · 2 months ago

The floating last user message at the top is FUCKING AWFUL and needs a toggle to turn it off. It takes up screen space and is distracting. This is so bad I was SURE it was a bug of some sort until I confirmed you added this bullshit as a "feature".

CALeaf · 2 months ago

oh no. it very inconvenient. When the pinned message is long, it takes up the entire viewport, making it impossible to see Claude's response.

gilney-canaltelecom · 2 months ago

more than a month and still nothing, great product, indeed 🤡

intelemodelseth · 2 months ago
more than a month and still nothing, great product, indeed 🤡

I still have a chat support ticket from April 17th, that has yet to receive a single response.

Llorx · 1 month ago

Users fixing this using Claude and Anthropic not moving a finger in months to add the feature yet the issue having a lot of interaction, says a lot about them.

gilney-canaltelecom · 21 days ago

<img width="687" height="853" alt="Image" src="https://github.com/user-attachments/assets/da219925-806a-4692-bc8f-5febefd848be" />

This is legiterally INFURIATING 😡 I cant read anything that claude said before the permission popup and when there is a bash output it even bugs out like this, bro, serisouly, why didn't they do anything till now? Who thought this fixed message was a good idea to begin with? 🤬🤬🤬🤬

jorge-fuentes-n3uron · 21 days ago

platform:linux it says in the tags. This happens in VsCode in any OS, not linux only.

And still no message from Anthropic, when this is a literal 5 minute fix that is pissing everyone off. Disgusting.

BioeJD · 21 days ago

Wanna hear the sound of my screams echoing into the void?

cpamp · 14 days ago

Coding is solved everybody