Skip to content

Pixi shell auto-activation can't be disabled #25163

Open
@MasonMcGill

Description

@MasonMcGill

Type: Bug

Behaviour

When the Python extension is installed and a pixi.toml file is present, the integrated terminal always starts in a Pixi environment that can't be exited without closing the terminal. Setting python.terminal.activateEnvironment to false doesn't change this.

The auto-entered environment is called "default", and seems to have the packages described in the pixi.toml file, but not the environment variables. So it isn't particularly useful, and I don't really understand how it relates to the environment that's entered when I run pixi shell (which Pixi calls something different).

Steps to reproduce:

  1. Run pixi init; pixi add python
  2. Open VS Code
  3. Set python.terminal.activateEnvironment to false
  4. Open the integrated terminal

Diagnostic data

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

2025-06-11 11:00:38.021 [info] Experiment 'pythonRecommendTensorboardExt' is active
2025-06-11 11:00:38.021 [info] Experiment 'pythonTerminalEnvVarActivation' is active
2025-06-11 11:00:38.021 [info] Python interpreter path: ./.pixi/envs/default/bin/python
2025-06-11 11:00:38.067 [info] > pyenv which python
2025-06-11 11:00:38.067 [info] cwd: .
2025-06-11 11:00:38.982 [info] > ~/.pixi/bin/pixi run --manifest-path ./pixi.toml python ~/.vscode-server/extensions/ms-python.python-2025.6.1-linux-x64/python_files/printEnvVariables.py
2025-06-11 11:00:38.982 [info] shell: bash
2025-06-11 11:00:39.339 [info] > /bin/python3 ~/.vscode-server/extensions/ms-python.python-2025.6.1-linux-x64/python_files/printEnvVariables.py
2025-06-11 11:00:39.339 [info] shell: bash
2025-06-11 11:00:39.382 [info] Setting environment variable CONDA_DEFAULT_ENV in collection to flybody-experiments {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2025-06-11 11:00:39.382 [info] Setting environment variable CONDA_PREFIX in collection to /home/mcgillm@hhmi.org/flybody-experiments/.pixi/envs/default {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2025-06-11 11:00:39.382 [info] Setting environment variable GSETTINGS_SCHEMA_DIR in collection to /home/mcgillm@hhmi.org/flybody-experiments/.pixi/envs/default/share/glib-2.0/schemas {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2025-06-11 11:00:39.382 [info] Setting environment variable GSETTINGS_SCHEMA_DIR_CONDA_BACKUP in collection to  {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2025-06-11 11:00:39.382 [info] Setting environment variable INIT_CWD in collection to /home/mcgillm@hhmi.org {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2025-06-11 11:00:39.382 [info] Setting environment variable MUJOCO_GL in collection to osmesa {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2025-06-11 11:00:39.382 [info] Prepending environment variable PATH in collection with /home/mcgillm@hhmi.org/.vscode-server/extensions/ms-python.python-2025.6.1-linux-x64/python_files/deactivate/bash:/home/mcgillm@hhmi.org/flybody-experiments/.pixi/envs/default/bin: {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2025-06-11 11:00:39.382 [info] Setting environment variable PIXI_ENVIRONMENT_NAME in collection to default {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2025-06-11 11:00:39.382 [info] Setting environment variable PIXI_ENVIRONMENT_PLATFORMS in collection to linux-64 {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2025-06-11 11:00:39.382 [info] Setting environment variable PIXI_EXE in collection to /home/mcgillm@hhmi.org/.pixi/bin/pixi {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2025-06-11 11:00:39.382 [info] Setting environment variable PIXI_IN_SHELL in collection to 1 {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2025-06-11 11:00:39.382 [info] Setting environment variable PIXI_PROJECT_MANIFEST in collection to /home/mcgillm@hhmi.org/flybody-experiments/pixi.toml {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2025-06-11 11:00:39.382 [info] Setting environment variable PIXI_PROJECT_NAME in collection to flybody-experiments {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2025-06-11 11:00:39.382 [info] Setting environment variable PIXI_PROJECT_ROOT in collection to /home/mcgillm@hhmi.org/flybody-experiments {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2025-06-11 11:00:39.382 [info] Setting environment variable PIXI_PROJECT_VERSION in collection to 0.1.0 {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2025-06-11 11:00:39.382 [info] Setting environment variable PIXI_PROMPT in collection to (flybody-experiments)  {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2025-06-11 11:00:39.382 [info] Setting environment variable XML_CATALOG_FILES in collection to file:///home/mcgillm@hhmi.org/flybody-experiments/.pixi/envs/default/etc/xml/catalog file:///etc/xml/catalog {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2025-06-11 11:00:39.382 [info] Prepending environment variable PS1 in collection with (default)  {"applyAtShellIntegration":true,"applyAtProcessCreation":false}
2025-06-11 11:00:39.384 [info] Send text to terminal: /bin/python3 /home/mcgillm@hhmi.org/.vscode-server/extensions/ms-python.python-2025.6.1-linux-x64/python_files/printEnvVariablesToFile.py /home/mcgillm@hhmi.org/.vscode-server/extensions/ms-python.python-2025.6.1-linux-x64/python_files/deactivate/bash/envVars.txt
2025-06-11 11:00:42.826 [info] Starting Pylance language server.

Extension version: 2025.6.1
VS Code version: Code 1.100.3 (258e40fedc6cb8edf399a463ce3a9d32e7e1f6f3, 2025-06-02T13:30:54.273Z)
OS version: Linux x64 6.15.0-061500-generic
Modes:
Remote OS version: Linux x64 6.8.0-60-generic

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


languageServer: "Pylance"

Installed Extensions
Extension Name Extension Id Version
black-formatter ms- 2025.2.0
debugpy ms- 2025.8.0
js-debug ms- 1.100.1
prettier-vscode esb 11.0.0
python ms- 2025.6.1
vscode-js-profile-table ms- 1.0.10
vscode-pylance ms- 2025.5.1
System Info
Item Value
CPUs Intel(R) Core(TM) Ultra 7 258V (8 x 3561)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
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
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
webnn: disabled_off
Load (avg) 0, 0, 0
Memory (System) 30.88GB (21.19GB free)
Process Argv --crash-reporter-id 6df8b05e-b912-46f8-ab97-c29d961b5c51
Screen Reader no
VM 0%
DESKTOP_SESSION plasma
XDG_CURRENT_DESKTOP KDE
XDG_SESSION_DESKTOP KDE
XDG_SESSION_TYPE wayland
Item Value
Remote SSH: ws3
OS Linux x64 6.8.0-60-generic
CPUs Intel(R) Xeon(R) CPU E5-2697 v3 @ 2.60GHz (56 x 1197)
Memory (System) 125.80GB (122.90GB free)
VM 0%
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
binariesv615:30325510
c4g48928:30535728
azure-dev_surveyone:30548225
vscrpc:30673769
962ge761:30959799
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dwnewjupytercf:31046870
pythonrstrctxt:31112756
nativeloc2:31192216
5fd0e150:31155592
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
9064b325:31222308
copilot_t_ci:31222730
e5gg6876:31282496
pythoneinst12:31285622
bgtreat:31268568
4gafe986:31271826
c7cif404:31314491
996jf627:31283433
pythonrdcb7:31303018
usemplatestapi:31297334
0aa6g176:31307128
7bj51361:31289155
747dc170:31275177
pylancecolor:31314202
aj953862:31281341
generatesymbolt:31295002
convertfstringf:31295003
gendocf:31295004
nesew1to4:31323295

Metadata

Metadata

Assignees

Labels

area-environmentsFeatures relating to handling interpreter environmentsarea-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