Repository navigation
Python REPL prompt garbled with shell integration escape sequences (]633;C...) in virtual environments on Ubuntu 24.04 #25505
Copy link
Copy link
Closed as duplicate
Closed as duplicate
Copy link
Labels
*duplicateIssue identified as a duplicate of another issue(s)Issue identified as a duplicate of another issue(s)area-terminalbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug
Description
Type: Bug
Behaviour
The Python REPL prompt is garbled and displays raw shell integration escape sequences instead of the clean prompt . The prompt looks like this:
]633;C]633;E;None]633;D;0]633;A>>> ]633;B
It happens whenever I open the Python REPL from a virtual environment. The prompt should be clean and display only the standard characters:
>>>
Disabling ms-python.python solves the problem, but I lose all the benefits of the extension.
Additional Context & Troubleshooting
- The issue only occurs when a virtual environment is active. The system Python REPL displays the prompt correctly.
- The problem is definitively caused by the
ms-python.pythonextension, as confirmed using theHelp: Start Extension Bisectcommand. - The problem disappears when running VS Code with a clean profile (
code --user-data-dir /tmp/vscode-test --extensions-dir /tmp/vscode-test-extensions), confirming the issue lies within the user configuration state managed by the extension. - The following settings, which are intended to control this behavior, do not fix the issue, suggesting they are being ignored by the extension in this context:
"python.experiments.optOutFrom": ["pythonTerminalEnvVarActivation"]"python.terminal.activateEnvironment": false
Steps to reproduce:
- Install the latest stable versions of VS Code and the ms-python.python extension.
- Install uv and uv-virtualenvwrapper.
- Install python 3.8.20 (uv python install 3.8.20).
- Create a virtual enviroment (mkvirtualenv -p 3.8 my-env).
- Open VSCode. Open a new terminal (Terminal -> New Terminal).
- Switch to my-env (workon my-env). Open python repl.
Diagnostic data
Extension version: 2025.14.0
VS Code version: Code 1.104.2 (e3a5acfb517a443235981655413d566533107e92, 2025-09-24T11:21:37.073Z)
OS version: Linux x64 6.14.0-33-generic
Modes:
- Python version (& distribution if applicable, e.g. Anaconda): 3.12.3
- Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): System
- Value of the
python.languageServersetting: Default
User Settings
Multiroot scenario, following user settings may not apply:
languageServer: "Pylance"
Installed Extensions
| Extension Name | Extension Id | Version |
|---|---|---|
| aws-toolkit-vscode | ama | 3.78.0 |
| copilot | Git | 1.372.0 |
| copilot-chat | Git | 0.31.4 |
| dark-autumn-frost | fim | 1.1.2 |
| debugpy | ms- | 2025.10.0 |
| docker | doc | 0.17.0 |
| EditorConfig | Edi | 0.17.4 |
| emr-tools | Ama | 0.7.0 |
| gc-excelviewer | Gra | 4.2.64 |
| github-vscode-theme | Git | 6.3.5 |
| intellicode-api-usage-examples | Vis | 0.2.9 |
| isort | ms- | 2025.0.0 |
| js-debug | ms- | 1.104.0 |
| js-debug-companion | ms- | 1.1.3 |
| jupyter | ms- | 2025.8.0 |
| jupyter-keymap | ms- | 1.1.2 |
| jupyter-renderers | ms- | 1.3.0 |
| mhtml2md | dev | 1.0.2 |
| nightowl-theme | Anc | 0.10.9 |
| python | ms- | 2025.14.0 |
| rainbow-bracket | tal | 1.0.2 |
| remote-containers | ms- | 0.427.0 |
| Theme-Monokai-Midnight | ger | 0.0.5 |
| unified-glow-vscode-theme | Ikr | 1.0.2 |
| vscode-containers | ms- | 2.2.0 |
| vscode-docker | ms- | 2.0.0 |
| vscode-edit-csv | jan | 0.11.7 |
| vscode-js-profile-table | ms- | 1.0.10 |
| vscode-jupyter-cell-tags | ms- | 0.1.9 |
| vscode-jupyter-slideshow | ms- | 0.1.6 |
| vscode-pylance | ms- | 2025.8.3 |
| vscode-python-envs | ms- | 1.8.0 |
| vscode-yaml | red | 1.19.0 |
| vscodeintellicode | Vis | 1.3.2 |
System Info
| Item | Value |
|---|---|
| CPUs | AMD Ryzen 7 7735HS with Radeon Graphics (16 x 3069) |
| GPU Status | 2d_canvas: enabled 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: disabled_software vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: disabled_off webnn: disabled_off |
| Load (avg) | 1, 1, 1 |
| Memory (System) | 30.12GB (21.91GB free) |
| Process Argv | --crash-reporter-id 5ce291ce-de6b-4aa9-b3a2-7660754e02d2 |
| Screen Reader | no |
| VM | 0% |
| DESKTOP_SESSION | ubuntu |
| XDG_CURRENT_DESKTOP | Unity |
| XDG_SESSION_DESKTOP | ubuntu |
| XDG_SESSION_TYPE | wayland |
A/B Experiments
vsliv368:30146709
vswsl492:30256859
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
usemplatestapi:31297334
aj953862:31281341
cs4_fixed:31391938
b6b4d950:31327385
nes-set-on:31351930
6abeh943:31336334
0cj2b977:31352657
gendocstringt:31395207
0574c672:31362109
cloudbuttont:31379625
todos-1:31390405
multireplacestringcontrol:31393296
treatment_gpt5applypatchexclusively:31394181
3efgi100_wstrepl:31382709
trigger-command-fix:31379601
auto_model_enabled:31385282
use-responses-api:31390855
gemagent1cf:31396483
dcggh915:31397497
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
*duplicateIssue identified as a duplicate of another issue(s)Issue identified as a duplicate of another issue(s)area-terminalbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug
Activity
bltravis commentedon Oct 8, 2025
Glad(?) I'm not the only one seeing this.
SolalAttiasInstadeep commentedon Oct 8, 2025
Disabling the Preview setting "Python › Terminal › Shell Integration: Enabled" (
python.terminal.shellIntegration.enabled) fixed this for me.Hope this helps!
bahiaxur commentedon Oct 15, 2025
That worked for me. Thanks! I don't know what features I'll lose by disabling this, but at least those characters are not appearing anymore.
davidwyld commentedon Oct 22, 2025
This setting seems to control the ability to launch a REPL integrated into VS code, which itself seems to work. With the setting
python.terminal.shellIntegration.enabledon, you get the "Ctrl click to launch VS Code Native REPL" in the Python shell, which opens the integrated REPL.eburnette commentedon Dec 9, 2025
I am seeing these escape characters on Red Hat Enterprise Linux release 8.6 (Ootpa). Disabling python.terminal.shellIntegration.enabled cleared it up but I'd like to have shell integration.
cj81499 commentedon Dec 10, 2025
Seems related to/duplicate of #25467
anthonykim1 commentedon Dec 11, 2025
/duplicate #25467