Skip to content

Shell Integration makes REPL prompt garbled #25467

@Isa-rentacs

Description

@Isa-rentacs

Type: Bug

Behaviour

With the shell integration option (Python > Terminal > Shell Integration) enabled, the prompt in Python REPL becomes garbled.

  • Expected (with the option disabled)
➜  python
Python 3.11.13 (main, Jul 11 2025, 22:43:55) [Clang 20.1.4 ] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.executable
'/home/<redacted>/.local/share/mise/installs/python/3.11.13/bin/python'
>>>
  • With the option enabled
➜  python    
Python 3.11.13 (main, Jul 11 2025, 22:43:55) [Clang 20.1.4 ] on linux
Type "help", "copyright", "credits" or "license" for more information.
Ctrl click to launch VS Code Native REPL
]633;C]633;E;sys.executable]633;D;0]633;A>>> ]633;Bimport sys
]633;C]633;E;import sys]633;D;0]633;A>>> ]633;Bsys.executable
'/home/<redacted>/.local/share/mise/installs/python/3.11.13/bin/python'
]633;C]633;E;sys.executable]633;D;0]633;A>>> ]633;B

Steps to reproduce:

  1. Enable the shell integration option (Python > Terminal > Shell Integration)
  2. Open a terminal
  3. Start a Python REPL (running python)

Diagnostic data

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

2025-09-17 18:31:37.901 [info] Telemetry is disabled
2025-09-17 18:31:37.901 [info] Telemetry level is off
2025-09-17 18:31:37.901 [info] Experiments are disabled, only manually opted experiments are active.
2025-09-17 18:31:37.901 [warning] Dir "<redacted>" is not watchable (directory does not exist)
2025-09-17 18:31:37.901 [warning] Dir "<redacted>" is not watchable (directory does not exist)
2025-09-17 18:31:37.955 [info] Not enabling terminal env var experiment in multiroot remote workspaces
2025-09-17 18:31:37.988 [info] Skipping ActivatedEnv Detection:  process.env.VSCODE_CLI !== '1'
2025-09-17 18:31:37.989 [info] Python interpreter path: ./<redacted_venv>/bin/python3
2025-09-17 18:31:38.086 [info] > pyenv which python
2025-09-17 18:31:38.086 [info] cwd: ~/<redacted>
2025-09-17 18:31:38.124 [info] Not enabling terminal env var experiment in multiroot remote workspaces
2025-09-17 18:31:43.701 [info] Starting Pylance language server.
2025-09-17 18:31:48.820 [info] Not enabling terminal env var experiment in multiroot remote workspaces
2025-09-17 18:31:48.896 [info] Send text to terminal: source <redacted_venv>/bin/activate
2025-09-17 18:33:12.714 [info] Discover tests for workspace name: undefined - uri: <redacted>/AppData/Roaming/Code/User/settings.json
2025-09-17 18:34:23.337 [info] Not enabling terminal env var experiment in multiroot remote workspaces
2025-09-17 18:34:23.417 [info] Send text to terminal: source <redacted_venv>/bin/activate
2025-09-17 18:34:46.973 [info] Discover tests for workspace name: undefined - uri: <redacted>/AppData/Roaming/Code/User/settings.json
2025-09-17 18:34:52.931 [info] Not enabling terminal env var experiment in multiroot remote workspaces
2025-09-17 18:34:53.014 [info] Send text to terminal: source <redacted_venv>/bin/activate

Extension version: 2025.14.0
VS Code version: Code 1.104.0 (f220831ea2d946c0dcb0f3eaa480eb435a2c1260, 2025-09-10T06:46:18.035Z)
OS version: Windows_NT x64 10.0.22631
Modes:
Remote OS version: Linux x64 5.10.240-218.966.amzn2int.x86_64

Metadata

Metadata

Assignees

Labels

bugIssue 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