-
Notifications
You must be signed in to change notification settings - Fork 38
Description
When opening a new integrated terminal in a workspace with a Python virtual environment (created by uv), the Python extension injects the activation command (source .../activate.fish) into the PTY buffer too early.
It happens before the Fish shell and the Starship prompt have fully initialized. This causes the activation command to be printed to the screen without a command prompt, leading to a messy, confusing visual experience, and sometimes causing duplicate prompt renderings.
Steps to Reproduce
-
Create a Python virtual environment in a workspace using uv (e.g., uv venv).
-
Open the workspace in VS Code.
-
Open a new Integrated Terminal.
Expected behavior
The Python extension should wait for the shell integration/prompt to fully load before injecting the command, OR ideally, use the Environment Variable Collection to activate the uv environment silently in the background without injecting raw text into the terminal.
Actual behavior
The source /path/to/.venv/bin/activate.fish command is injected blindly into the stdin buffer. The terminal echoes this command before the Starship prompt has time to render, making it look like a broken shell state.
Environment data
-
VS Code version: 1.109.5
-
Python Extension version: 2026.2.0
-
OS: macOS Tahoe 26.3 (arm64, Apple M1 Pro)
-
Shell: fish 4.5.0
-
Prompt: Starship
-
Python Env Manager: uv