-
Notifications
You must be signed in to change notification settings - Fork 37.8k
Description
Type: Bug
-
Summary
Agent-run commands cannot target or read detached terminal windows; when a terminal is detached via workbench.action.terminal.moveIntoNewWindow, subsequent agent commands create a new attached terminal instead of using the detached one. -
Environment
- VS Code; Windows 11
- Shells involved: CMD and PowerShell profiles
- Agent: GitHub Copilot agent running commands via VS Code terminal API
-
Steps to Reproduce
3.1 Open an integrated terminal in VS Code.
3.2 Detach it using workbench.action.terminal.moveIntoNewWindow.
3.3 Ask the Copilot agent to run any command (e.g., echo TEST 123).
3.4 Observe where the command executes. -
Expected Behavior
4.1 Agent should be able to reuse the detached terminal window (or at least allow targeting it) so output appears there.
4.2 Alternatively, the API should expose detached terminals so agents can direct commands to them. -
Actual Behavior
5.1 Detached terminal is ignored; agent creates a new attached terminal in the main VS Code window and runs the command there.
5.2 Agent cannot access or read output from the detached terminal. -
Impact:
Users who detach terminals for isolation/visibility cannot have agent-driven commands run in or read from those terminals, breaking workflows that rely on detached terminals. -
Possible Cause:
Likely limitation of VS Code terminal API: detached terminals are not exposed/targetable by agents.
Extension version: 0.37.1
VS Code version: Code 1.109.0 (bdd88df, 2026-02-04T02:01:38.288Z)
OS version: Windows_NT x64 10.0.26200
Modes:
System Info
| Item | Value |
|---|---|
| CPUs | AMD Ryzen 5 5600X 6-Core Processor (12 x 4200) |
| GPU Status | 2d_canvas: enabled GPU0: VENDOR= 0x10de, DEVICE=0x1c03 [NVIDIA GeForce GTX 1060 6GB], DRIVER_VENDOR=NVIDIA, DRIVER_VERSION=32.0.15.6636 ACTIVE GPU1: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.26100.7309 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.91GB (8.53GB free) |
| Process Argv | --crash-reporter-id f905f5d9-0c39-4fd1-b84a-481b7bf6f9a2 |
| Screen Reader | no |
| VM | 0% |
A/B Experiments
vsliv368:30146709
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31436602
aj953862:31281341
b6b4d950:31327385
6abeh943:31336334
cloudbuttont:31379625
3efgi100_wstrepl:31403338
839jf696:31457053
use-responses-api:31390855
je187915:31401257
ec5jj548:31422691
cmp-ext-treat:31426748
cp_cls_t_966_ss:31454198
c0683394:31458171
ge8j1254_inline_auto_hint_haiku:31431912
nes-autoexp-off:31446584
a5gib710:31434435
5j92g670_sonnet:31457540
rename_enabled:31436409
7a04d226_do_not_restore_last_panel_session:31438103
anthropic_thinking_c:31457102
722j7530_gpt_5_2_codex:31458091
h0hdh950:31428394
preserve_tokens:31444547
cp_cls_t_1081:31454832
copilot-nes-oct-trt:31432596
ia-use-proxy-models-svc:31452481
nes-slash-models-on:31441832
nes-set-to-on:31441941
a43f0575b:31442825
c0ci8992_validated:31449878
nes-conv-1-2:31447851
showstats:31457174
0a33d263:31458759
pp-44cc9697:31455969
hg17d649:31458077
nes-extended-on:31455476
anthropic_tst_c:31457103
chat:31457767