claude-code - 💡(How to fix) Fix VSCode sticky user message header hides assistant responses in long turns [1 participants]

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…
GitHub stats
anthropics/claude-code#49114Fetched 2026-04-17 08:50:29
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×4

When a user message is tall (e.g. pasting compiler output, logs, or large code blocks), the assistant's response within the same turn becomes completely invisible — hidden behind the sticky user message header.

Root Cause

User messages in the chat have position: sticky; z-index: 2; top: 0 (the .stickyHeader CSS class). This is designed to keep the user's prompt visible while scrolling through the AI's response. However, when the user message is taller than the viewport, the sticky element's visual extent covers the entire assistant response area below it. Since the sticky header has z-index: 2 and the timeline/assistant messages have z-index: auto, the assistant responses render behind the sticky user message and are completely invisible.

Fix Action

Fix / Workaround

Tested by patching webview/index.css — assistant responses become visible, no visual regressions observed.

Code Example

.message_07S1Yg.stickyHeader_07S1Yg {
  position: sticky;
  z-index: 2;
  top: 0;
  background-image: linear-gradient(...);
}
.message_07S1Yg.stickyHeader_07S1Yg:has([aria-expanded=true]) {
  z-index: 3;
}

---

.message.stickyHeader {
  position: relative;  /* was: sticky */
  z-index: auto;       /* was: 2 */
  /* remove top: 0 and background-image gradient */
}
RAW_BUFFERClick to expand / collapse

Description

When a user message is tall (e.g. pasting compiler output, logs, or large code blocks), the assistant's response within the same turn becomes completely invisible — hidden behind the sticky user message header.

Root cause

User messages in the chat have position: sticky; z-index: 2; top: 0 (the .stickyHeader CSS class). This is designed to keep the user's prompt visible while scrolling through the AI's response. However, when the user message is taller than the viewport, the sticky element's visual extent covers the entire assistant response area below it. Since the sticky header has z-index: 2 and the timeline/assistant messages have z-index: auto, the assistant responses render behind the sticky user message and are completely invisible.

Example

  • User pastes 2510px of compiler output
  • Assistant responds with thinking + text + tool calls (~476px total)
  • The sticky user message pins to top: 0 and extends to y≈367 in the viewport
  • All assistant messages (y=142 to y=371) are painted behind the sticky header
  • The user sees compiler output → next user message, with no visible AI response in between

CSS rules involved

.message_07S1Yg.stickyHeader_07S1Yg {
  position: sticky;
  z-index: 2;
  top: 0;
  background-image: linear-gradient(...);
}
.message_07S1Yg.stickyHeader_07S1Yg:has([aria-expanded=true]) {
  z-index: 3;
}

Reproduction

  1. Open a session in VSCode/Cursor
  2. Paste a large block of text (e.g. 50+ lines of compiler output or logs) as a user message
  3. Wait for the AI to respond with tool calls
  4. Scroll through the turn — the assistant's response (text, tool calls, thinking) is invisible

Verified fix

Remove sticky positioning entirely — the conversation should be a linear scroll:

.message.stickyHeader {
  position: relative;  /* was: sticky */
  z-index: auto;       /* was: 2 */
  /* remove top: 0 and background-image gradient */
}

Tested by patching webview/index.css — assistant responses become visible, no visual regressions observed.

Version

Claude Code 2.1.109

extent analysis

TL;DR

Remove the sticky positioning from the user message header to make the assistant's response visible.

Guidance

  • Identify the CSS class .stickyHeader and modify its properties to remove sticky positioning.
  • Update the position property to relative and reset z-index to auto to ensure the assistant's response is not hidden behind the user message.
  • Verify the fix by pasting a large block of text as a user message and checking if the assistant's response is visible after scrolling.
  • Test the changes in different scenarios to ensure no visual regressions occur.

Example

.message.stickyHeader {
  position: relative;
  z-index: auto;
}

Notes

This fix may affect the overall user experience, as the user message header will no longer remain sticky while scrolling. Further testing and refinement may be necessary to achieve the desired behavior.

Recommendation

Apply the workaround by removing the sticky positioning from the user message header, as it is a verified fix that resolves the issue without introducing new problems.

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