Skip to content

Block commands from being run in fish terminal before sourcing activate.fish #25863

@rdong8

Description

@rdong8

Type: Bug

Behaviour

When you open a fish terminal, it source's the project's .venv/bin/activate.fish. But there's usually a long delay before this command is actually run, which means you can often start typing your own command before this runs, and it gets pasted to the end of your command, causing an error. As a result, the Python venv doesn't get activated properly. I can see how it tries to work around this by entering ^C before the source to cancel any command that is currently being typed, but if you're a fast typer you can easily get a keystroke in between the ^C and the source and still get an error.

Steps to reproduce:

  1. Open a fish terminal
  2. Quickly press and hold any key

You end up with an error like this:

Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
rydong@ubuntu2404-012 ~/p/cs-444-compiler (main)> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa^C
rydong@ubuntu2404-012 ~/p/cs-444-compiler (main)> aaasource /u4/rydong/projects/cs-444-compiler/.venv/bin/activate.fish
aaaaaaaaaaaaaasource: command not found
a⏎                                                                                                                        
rydong@ubuntu2404-012 ~/p/cs-444-compiler (main) [127]> 

Now notice how the virtual environment is not activated in the latest command prompt.

Diagnostic data

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

XXX

Extension version: 2026.4.0
VS Code version: Code 1.110.1 (61b3d0ab13be7dda2389f1d3e60a119c7f660cc3, 2026-03-06T23:03:27.520Z)
OS version: Linux x64 6.19.7-200.fc43.x86_64 snap
Modes:
Remote OS version: Linux x64 6.8.0-90-generic

  • Python version (& distribution if applicable, e.g. Anaconda): 3.12.3
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Venv
  • Value of the python.languageServer setting: Default
User Settings


languageServer: "None"

Installed Extensions
Extension Name Extension Id Version
cmake-tools ms- 1.22.28
colab goo 0.4.1
cpp-devtools ms- 0.3.6
cpptools ms- 1.30.5
cpptools-extension-pack ms- 1.5.1
debugpy ms- 2025.18.0
even-better-toml tam 0.21.2
geminicodeassist goo 2.75.0
isort ms- 2025.0.0
js-debug ms- 1.110.0
jupyter ms- 2025.9.1
jupyter-renderers ms- 1.3.0
lldb-dap llv 0.4.1
makefile-tools ms- 0.12.17
marmoset uwa 0.2.0
pyrefly met 0.55.0
python ms- 2026.4.0
quarto qua 1.130.0
r REd 2.8.7
ruff cha 2026.36.0
vscode-ansi ili 1.1.7
vscode-clangd llv 0.4.0
vscode-js-profile-table ms- 1.0.10
vscode-jupyter-cell-tags ms- 0.1.9
vscode-jupyter-slideshow ms- 0.1.6
vscode-just-syntax nef 0.9.0
vscode-pandoc Chr 0.7.1
vscode-pylance ms- 2026.1.1
vscode-python-envs ms- 1.22.0
vscode-yaml red 1.21.0
System Info
Item Value
CPUs AMD Ryzen AI 9 365 w/ Radeon 880M (20 x 1588)
GPU Status 2d_canvas: unavailable_software
GPU0: VENDOR= 0xffff [Google Inc. (Google)], DEVICE=0xffff [ANGLE (Google, Vulkan 1.3.0 (SwiftShader Device (Subzero) (0x0000C0DE)), SwiftShader driver-5.0.0)], DRIVER_VENDOR=SwANGLE, DRIVER_VERSION=5.0.0 ACTIVE
Machine model name:
Machine model version:
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
webgpu: disabled_off
webnn: unavailable_software
Load (avg) 1, 0, 0
Memory (System) 27.18GB (21.16GB free)
Process Argv --no-sandbox --ozone-platform=x11 --crash-reporter-id 39b311f9-f807-4c48-b8a8-444961774cc1
Screen Reader no
VM 0%
DESKTOP_SESSION gnome
XDG_CURRENT_DESKTOP GNOME
XDG_SESSION_DESKTOP gnome
XDG_SESSION_TYPE wayland
Item Value
Remote SSH: uwcs
OS Linux x64 6.8.0-90-generic
CPUs AMD EPYC 9754 128-Core Processor (64 x 0)
Memory (System) 1006.49GB (926.60GB free)
VM 0%
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
82j33506:31327384
6abeh943:31336334
envsdeactivate2:31464701
cloudbuttont:31379625
aihoversummaries_t:31469308
3efgi100_wstrepl:31403338
56b7f661:31457055
use-responses-api:31390855
je187915:31454425
ec5jj548:31422691
cp_cls_c_966_ss:31454199
4je02754:31466945
38bie571_auto:31429954
7a04d226_do_not_restore_last_panel_session:31438103
preserve_tokens:31444546
cp_cls_t_1081:31454832
a43f0575b:31442825
e9c30283:31461165
test_treatment2:31471001
idci7584:31464702
edit_mode_hidden:31461530
864ei723_large_tool_results_to_disk:31460878
notips:31471632
b1f5h706:31471673
chat:31457767
ah:31460422
8a2c4887_5_3_codex_prompt:31475326
cpptoolsoff-v2:31475362
4dgh1208:31471592
thinking_c:31471065
nes-notsn-1:31475122

Metadata

Metadata

Assignees

Labels

area-terminalbugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from poster

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions