Skip to content

[BUG] VSCode extension: scroll anchor follows injected <task-notification> blocks instead of the user's actual last prompt #82212

Description

@shaikistra

Environment

  • Claude Code VSCode native extension (Linux)

Description

The chat viewport anchors to the most recent user-role message, so when I scroll through the conversation my last prompt is pinned/visible at the top. This is the expected and useful behavior.

However, harness-injected blocks (<task-notification> from background Bash / background agents / workflows, and similar system-injected content) are delivered as user-role messages. The scroll anchoring doesn't distinguish them from messages the human actually typed, so once a background task completes, the anchor jumps to the latest injected notification and my real prompt scrolls out of view.

Steps to reproduce

  1. Send a prompt that causes Claude to start a background task (e.g. a run_in_background Bash command or a background subagent).
  2. Wait for the task to complete so a <task-notification> is injected into the conversation.
  3. Scroll up/down through the conversation.

Expected

The anchored/pinned message is the last prompt the user actually typed.

Actual

The anchor is the last injected <task-notification> block, which reads as if it came from the user.

Suggested fix

When computing the scroll anchor (and any "last user message" affordances), skip system-injected user-role content (task notifications, system reminders, hook output) and anchor to the last human-authored message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions