Skip to content

Terminal Output Duplication in VSCode Integrated Bash #337

@arya2004

Description

@arya2004

Describe the bug
In the VSCode integrated terminal using the default Bash shell, executing previously used commands (like node -v) via the up-arrow key results in duplicated terminal output. The issue appears sporadically and does not occur in standalone terminal windows. It appears related to how the integrated terminal redraws content during rapid command reuse or clearing.

To Reproduce

Steps to reproduce the behavior:

  1. Open VSCode with integrated terminal (bash as default shell).

  2. Run the following commands in order:

    node -v
    clear
    # Press up arrow to recall node -v
    node -v
    # Press up arrow again to recall the first node -v and run it again
    node -v
  3. Observe duplicated or repeated terminal output in the buffer.

Screenshot of the issue:

Image

Screencast (video reproduction):

Screencast.from.2025-05-11.14-55-19.webm

Expected behavior
Each command should execute only once with clean output. Reusing history with the up-arrow should not cause buffer repetition or redraw glitches.


Environment

  • OS: Ubuntu 24.04.2 LTS
  • VSCode Version: 1.100.0 (19e0f9e681ecb8e5c09d8784acaa601316ca4571)
  • Output of is --version: 0.0.1-rc.20
  • Node.js Version: v22.15.0
  • Shell: bash
  • Shell Version: GNU bash 5.2.21(1)-release (x86_64-pc-linux-gnu)

Additional context

  • This issue is exclusive to VSCode’s integrated terminal.
  • It does not appear in standard external terminals like gnome-terminal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwaitingWaiting on feedback / more information

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions