Skip to content

RunInTerminalTool delays marking short commands complete when shell-integration cycles/retries occur #323030

Description

@moeatksi

Type: Bug

  • Direct short pytest:
    sh -lc "PYTHONPATH=$(pwd) pytest -q tests/unit_tests/utility/architecture_helper_test.py::test_get_sw_item_for_container_found -q -q; echo COPILOT_REPRO_DONE $(date -u +%Y-%m-%dT%H:%M:%SZ)"

  • Wrapper run (captures stdout/stderr files and prints marker):
    bash tools/copilot_completion_wrapper.sh -- sh -c "PYTHONPATH=$(pwd) pytest -q tests/unit_tests/utility/architecture_helper_test.py::test_get_sw_item_for_container_found -q -q; echo COPILOT_REPRO_DONE $(date -u +%Y-%m-%dT%H:%M:%SZ)"

Observed markers / timestamps from repro

  • COPILOT_REPRO_DONE 2026-06-25T21:42:57Z
  • COPILOT_WRAPPER_DONE 2026-06-25T21:43:04Z exit=0 out=/tmp/copilot_wrapper_20260625T214257Z.out err=/tmp/copilot_wrapper_20260625T214257Z.err

Key log excerpts

  • "ToolTerminalCreator:createTerminal: Waiting 4999ms for shell integration"
  • "Shell integration failed to add capabilities within 10 seconds"
  • "RunInTerminalTool: Using rich execute strategy for command ..."
  • Repeated trackIdleOnPrompt transitions (Initial→Executing → PromptAfterExecuting → Executing)

Hypothesis

  • The extension waits on shell-integration/banner/prompt-model signals; when those are delayed or absent, RunInTerminalTool re-enters idle-detection cycles and delays finalization. Suggest fallback to process-exit/pty events or increased tolerance.

VS Code version: Code 1.125.1 (fcf6047, 2026-06-19T08:39:34Z)
OS version: Linux x64 6.14.5-100.fc40.x86_64
Modes:

System Info
Item Value
CPUs 13th Gen Intel(R) Core(TM) i7-13850HX (14 x 0)
GPU Status 2d_canvas: unavailable_software
GPU0: VENDOR= 0x0000 [Google Inc. (Mesa)], DEVICE=0x0000 [ANGLE (Mesa, llvmpipe (LLVM 18.1.6 256 bits), OpenGL 4.5 (Core Profile) Mesa 24.1.7)], DRIVER_VENDOR=Mesa, DRIVER_VERSION=24.1.7 ACTIVE
Machine model name:
Machine model version:
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
opengl: unavailable_off
rasterization: unavailable_off
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: unavailable_off
video_encode: disabled_software
vulkan: disabled_off
webgl: unavailable_off
webgpu: unavailable_software
webgpu_on_vk_via_gl_interop: disabled_off
webnn: disabled_off
Load (avg) 0, 0, 0
Memory (System) 7.74GB (3.46GB free)
Process Argv --password-store=gnome --crash-reporter-id 30ad4041-8b7a-443c-98b5-5ab920c5ebc0
Screen Reader no
VM 0%
DESKTOP_SESSION xfce
XDG_CURRENT_DESKTOP XFCE
XDG_SESSION_DESKTOP undefined
XDG_SESSION_TYPE x11
Extensions (5)
Name Identifier Author Version
Ruff charliermarsh.ruff charliermarsh 2026.56.0
Python Debugger ms-python.debugpy ms-python 2026.6.0
Python ms-python.python ms-python 2026.4.0
Pylance ms-python.vscode-pylance ms-python 2026.2.1
Python Environments ms-python.vscode-python-envs ms-python 1.36.0
A/B Experiments
vsliv368:30146709
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
82j33506:31327384
6abeh943:31336334
envsactivate1:31538736
gh487529:31521844
cloudbuttont:31379625
3efgi100_wstrepl:31403338
ddidt:31399633
ec5jj548:31422691
cp_cls_t_966_ss:31526232
4je02754:31466945
8hhj4413:31478653
ge8j1254_inline_auto_hint_haiku:31490510
38bie571_auto:31478677
cp_cls_c_1081:31454833
conptydll_true:31498968
ia-use-proxy-models-svc:31452481
e9c30283:31461165
test_treatment2:31471001
c9b86496:31447327
idci7584:31464702
e3e4d672:31494082
ei9d7968:31496641
nes-extended-on:31455476
chat:31457767
8hig5102:31480529
89g7j272:31518289
7e187181:31503455
i2gc6536:31499202
52612955:31516516
ghj88844:31499326
h08i8180:31475369
23c7c724:31520045
ddid_t:31478206
hmra_i5g22:31518061
7df3h592:31512476
cp_cls_t_1082:31535311
logging_enabled_new:31498466
db5d2638:31499441
jb_cp_cls_t_632:31537244
56dj4588:31512888
32d76977:31512328
ha629193:31508444
cdk-lw-on:31524445
31fi7170_t:31522396
jh5f2457_c:31539316
api_cot_ctrl:31513533
hgf2d445:31529595
41836166:31537719
jbcp_cls_pctr_t:31531130
61138546:31518536
cp_intellij_c_nes:31533503
jf4hg949:31526829
nes-curr-leftover-1500:31538366
h561g132:31533256
session_8:31532895
ihg5j128:31534457

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions