Backgrounded VSCode window throttles integrated terminal and Remote-SSH processes on Windows

Open
#317,487 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Quiet
Tech stack
electron, typescript
Domain
cli, desktop, devtools

Research direction

Reproduce the slowdown on Windows with both local integrated terminals and Remote-SSH, comparing focused and backgrounded VS Code windows. Start by investigating the terminal output behavior, Electron background throttling, xterm.js refresh scheduling, and Remote-SSH terminal event handling mentioned in the report. Done means terminal and remote processes maintain normal execution speed when VS Code is unfocused or minimized, with the behavior verified against the macOS comparison.

Written by the indexing model from the issue text.

Description

Type: Bug

## Problem Description
After updating VSCode to a newer version, terminal processes become extremely slow whenever the VSCode window loses focus or is minimized on Windows.
This issue affects both:

  • local integrated terminal processes
  • Remote-SSH sessions running on remote Linux servers
    The slowdown is severe enough that remote CPU utilization drops dramatically when the local VSCode window is placed in the background.
    Once VSCode returns to the foreground, execution speed and remote CPU utilization immediately recover.
    This behavior does NOT occur on macOS.
    

Key Observation

Programs with continuous terminal output or actively updating progress bars (such as tqdm in deep learning training scripts) are mostly unaffected.
However, programs with minimal terminal output become extremely slow when VSCode is unfocused.
This strongly suggests the issue may be related to:

  • terminal/PTTY update handling
  • stdout/stderr buffering
  • Electron background throttling
  • xterm.js refresh scheduling
  • Remote-SSH terminal event handling
    

Steps to Reproduce

Local Terminal
  1. Open VSCode on Windows
  2. Start a long-running CPU-intensive process in the integrated terminal
  3. Switch focus to another application or minimize VSCode
  4. Observe significant slowdown
  5. Bring VSCode back to foreground
  6. Execution speed immediately recovers
Remote-SSH
  1. Connect to a remote Linux server using Remote-SSH
  2. Start a CPU-intensive task remotely
  3. Monitor remote CPU utilization using htop
  4. Minimize VSCode or switch focus away
  5. Observe remote CPU utilization dropping significantly
  6. Return VSCode to foreground
  7. Remote CPU utilization immediately returns to normal
    

Expected Behavior

Terminal processes should continue executing at normal speed regardless of whether the VSCode window is focused.
Remote server computation should not depend on local VSCode window focus state.


Actual Behavior

When VSCode is unfocused or minimized on Windows:
  • integrated terminal processes slow down dramatically
  • Remote-SSH tasks also slow down
  • remote CPU utilization drops significantly
  • execution speed becomes extremely slow
When VSCode regains focus:
  • execution speed immediately recovers
  • remote CPU utilization returns to normal
    

Additional Notes

  • The issue started after updating VSCode
  • macOS does not reproduce the problem
  • Continuous terminal output (e.g. tqdm progress bars) significantly reduces or avoids the issue
  • The problem appears strongly correlated with terminal output activity

VS Code version: Code 1.120.0 (0958016b2af9f09bb4257e0df4a95e2f90590f9f, 2026-05-12T20:17:22Z)
OS version: Windows_NT x64 10.0.26200
Modes:
Remote OS version: Linux x64 6.17.0-29-generic
Remote OS version: Linux x64 6.6.87.2-microsoft-standard-WSL2

System Info
Item Value
CPUs AMD Ryzen 5 3500X 6-Core Processor (6 x 3600)
GPU Status 2d_canvas: enabled
GPU0: VENDOR= 0x10de, DEVICE=0x1f82 [NVIDIA GeForce GTX 1650], DRIVER_VENDOR=NVIDIA, DRIVER_VERSION=32.0.15.9186 ACTIVE
GPU1: VENDOR= 0x10de, DEVICE=0x1f82 [NVIDIA GeForce GTX 1650], DRIVER_VERSION=32.0.15.9186
GPU2: VENDOR= 0x10de, DEVICE=0x1f82 [NVIDIA GeForce GTX 1650], DRIVER_VERSION=32.0.15.9186
GPU3: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.26100.8246
Machine model name:
Machine model version:
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 23.93GB (1.97GB free)
Process Argv --crash-reporter-id 8d43a199-8462-4579-acfb-0d3002dd6016
Screen Reader no
VM 44%
Item Value
Remote SSH: 10.16.5.146
OS Linux x64 6.17.0-29-generic
CPUs 12th Gen Intel(R) Core(TM) i7-12700KF (20 x 800)
Memory (System) 62.61GB (56.13GB free)
VM 0%
Item Value
Remote WSL: Ubuntu-26.04
OS Linux x64 6.6.87.2-microsoft-standard-WSL2
CPUs AMD Ryzen 5 3500X 6-Core Processor (6 x 0)
Memory (System) 11.65GB (9.49GB free)
VM 0%
Extensions (17)
Extension Author (truncated) Version
es7-react-js-snippets dsz 4.4.3
remote-containers ms- 0.459.0
remote-ssh ms- 0.122.0
remote-ssh-edit ms- 0.87.0
remote-wsl ms- 0.104.3
vscode-remote-extensionpack ms- 0.26.0
remote-explorer ms- 0.5.0
remote-server ms- 1.5.3
python-extended-snippets tus 0.0.1
copilot-chat Git 0.48.1
claude-code Ant 2.1.145
vscode-pull-request-github Git 0.144.0
go gol 0.52.2
rainbow-csv mec 3.24.1
vscode-containers ms- 2.4.4
vscode-language-pack-zh-hans MS- 1.118.2026051522
chatgpt ope 26.513.21555
A/B Experiments
vsliv368cf:30146710
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
6abeh943:31336334
envsactivate1:31505457
cloudbuttont:31379625
3efgi100_wstrepl:31403338
ddidt:31399633
ec5jj548:31422691
cp_cls_t_966_ss:31454198
inlinechat_v2_hd992725:31505030
4je02754:31466945
c3h7c220:31478652
38bie571_auto:31429954
cp_cls_c_1081:31454833
conptydll_true:31498968
ia-use-proxy-models-svc:31452481
e9c30283:31461165
test_treatment2:31471001
ts_provider_enabled:31458190
c9b86496:31447327
control_6dc23131:31513471
idci7584:31464702
e3e4d672:31494082
ei9d7968:31496641
nes-extended-on:31455476
chat:31457767
8hig5102:31480529
89g7j272:31507493
7e187181:31503455
i2gc6536:31499202
52612955:31515327
ghj88844:31499326
ddid_c:31478207
hmra_i5g22:31514984
getcmakediagnosticsoff:31489825
ja75b849:31515466
7df3h592:31512476
pro_large_t:31499376
cp_cls_c_1082:31504161
logging_enabled_new:31498466
j0d79568:31499440
jb_cp_cls_c_632:31510883
b1ei0813:31506238
56dj4588:31512888
cg448276_tst_on:31514358
32d76977:31512328
ha629193:31508444
539gd155_c:31506875
jh5f2457_c:31515489
api_cot_off:31513532
495e8e63:31509470

Dominant language
TypeScript
Stars
193k
Forks
42.9k
PR merge metrics
PR metrics pending

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/vscode

All issues in microsoft/vscode

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.