Skip to content

Shell Integration makes REPL prompt garbled #25467

Description

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 (View→Output, 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

Activity

  1. NaOHCC commented on Sep 22, 2025

    @NaOHCC

    +1, I have the same problem

  2. ctx400 commented on Sep 27, 2025

    @ctx400

    Same here. This just happened to me after updating.

  3. anthonykim1 commented on Sep 29, 2025

    @anthonykim1

    Thanks for the issue. Do you all have terminal.integrated.shellIntegration.enabled to true?

    And are all of you using remote-ssh and not wsl?

  4. added
    bugIssue identified by VS Code Team member as probable bug
    and removed
    triage-neededNeeds assignment to the proper sub-team
    on Sep 29, 2025
  5. nrlulz commented on Sep 29, 2025

    @nrlulz

    And are all of you using remote-ssh and not wsl?

    I am seeing this behavior in a linux devcontainer on mac os, and terminal.integrated.shellIntegration.enabled is true. Garbled python prompt when python.terminal.shellIntegration.enabled is also enabled, appears normal when disabled. I have not tried to isolate or minimally reproduce the issue, but I'm happy to provide more info if needed.

  6. Isa-rentacs commented on Sep 29, 2025

    @Isa-rentacs
    Author

    Thanks for the issue. Do you all have terminal.integrated.shellIntegration.enabled to true?

    Yes, with the option enabled, the REPL prompt became garbled. I was using remote-ssh and the terminal is for the remote machine.

    I tried to repro it again but somehow it doesn't reproduce for me regardless of the option enabled or disabled. I also do not see the message Ctrl click to launch VS Code Native REPL at the start of the REPL anymore.

    Here's my current environment

    Extension version: 2025.14.0
    VS Code version: Code 1.104.2 (e3a5acfb517a443235981655413d566533107e92, 2025-09-24T11:21:37.073Z)
    OS version: Windows_NT x64 10.0.22631
    
  7. ctx400 commented on Sep 29, 2025

    @ctx400

    Thanks for the issue. Do you all have terminal.integrated.shellIntegration.enabled to true?

    And are all of you using remote-ssh and not wsl?

    I am using VSCode on a Chromebook in the Linux dev environment. With terminal.integrated.shellIntegration.enabled set to true, the prompt is garbled. Only after I disabled this option did the prompt display normally again.

    EDIT: I also see this issue on a true Linux machine (Fedora 42)

  8. egidioln commented on Oct 3, 2025

    @egidioln

    Hello! Same issue here. This renders the REPL unusable in the Terminal tab.

    Image

    Setting terminal.integrated.shellIntegration.enabled to `false is also my workaround (after restarting the windows)

    I'm on Ubuntu 24.04.3

    Version: 1.104.3
    Commit: 385651c938df8a906869babee516bffd0ddb9829
    Date: 2025-10-02T12:30:51.747Z
    Electron: 37.3.1
    ElectronBuildId: 12404162
    Chromium: 138.0.7204.235
    Node.js: 22.18.0
    V8: 13.8.258.31-electron.0
    OS: Linux x64 6.14.0-32-generic
    
  9. DetachHead commented on Oct 18, 2025

    @DetachHead

    Thanks for the issue. Do you all have terminal.integrated.shellIntegration.enabled to true?

    turning that off fixes it yeah

    And are all of you using remote-ssh and not wsl?

    neither, it happens locally . im on linux mint 22.2

    somebody mentioned in microsoft/vscode#271480 (comment) that this only seems to happen with uv-managed python versions. i tested this myself and that seems to be the case:

    Image
  10. ctx400 commented on Oct 18, 2025

    @ctx400

    somebody mentioned in microsoft/vscode#271480 (comment) that this only seems to happen with uv-managed python versions. i tested this myself and that seems to be the case:

    Adding to my previous comments, I exclusively use UV-managed Python, so this may be why I ran into the issue originally. All of my VSCode projects use UV.

    I hardly ever use a system-level Python installation, except to briefly enter a REPL to, say, perform a quick calculation and then exit, and system Python usage for me is in a regular terminal, not within VSCode.

  11. kyleabbott commented on Oct 18, 2025

    @kyleabbott

    Also seeing this on UV-managed Python via Remote SSH. Can confirm disabling Python > Terminal > Shell Integration resolves the issue.

  12. 8 remaining items

  13. github-actions commented on Dec 8, 2025

    @github-actions

    Hey Anthony Kim (@anthonykim1), this issue might need further attention.

    Junnosuke Kuroda (@Isa-rentacs), you can help us out by closing this issue if the problem no longer exists, or adding more information.

  14. modified the milestones: November 2025, on Dec 11, 2025
  15. removed this from the milestone on Jan 5, 2026
  16. cbrnr commented on Apr 21, 2026

    @cbrnr

    Anthony Kim (@anthonykim1) João Moreno (@joaomorenoalt) I have been experiencing the same issue for a while now, let me try to clarify what I think the problem is.

    There seems to be an issue with "python.terminal.shellIntegration.enabled": true, regardless of the Python version and whether or not it was installed via uv. The problem is not just a garbled prompt, but garbled pasted code as well (which is much more serious).

    To reproduce, paste the following code snippet into the editor, select all lines, and hit Shift-Enter:

    x = 1
    y = 2
    z = 3
    a = 4
    b = 5
    c = 6
    d = 7
    e = 8
    f = 9
    g = 10
    h = 11
    i = 12
    j = 13
    k = 14
    l = 15
    
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l
    )
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l
    )

    I think one of the triggers is a lot of selected code, as the problem does not occur with shorter portions. Executing this example results in the following output in the Terminal (I had to hide it under Details because it is pretty long; here I'm using the system Python on macOS Tahoe 26.4.1 to show that it is not related to uv):

    Details
    Python 3.9.6 (default, Apr  7 2026, 02:38:40) 
    [Clang 21.0.0 (clang-2100.0.123.102)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    Cmd click to launch VS Code Native REPL
    >>> x = 1
    y = 2
    z = 3
    a = 4
    b = 5
    c = 6
    d = 7
    e = 8
    f = 9
    g = 10
    h = 11
    i = 12
    j = 13
    k = 14
    l = 15
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l
    )
    
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + >>> y = 2
    z = 3
    a = 4
    b = 5
    c = 6
    d = 7
    e = 8
    f = 9
    g = 10
    h = 11
    i = 12
    j = 13
    k = 14
    l = 15
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l
    )
    
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +>>> z = 3
    a = 4
    b = 5
    c = 6
    d = 7
    e = 8
    f = 9
    g = 10
    h = 11
    i = 12
    j = 13
    k = 14
    l = 15
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l
    )
    
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x>>> a = 4
    b = 5
    c = 6
    d = 7
    e = 8
    f = 9
    g = 10
    h = 11
    i = 12
    j = 13
    k = 14
    l = 15
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l
    )
    
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + >>> b = 5
    c = 6
    d = 7
    e = 8
    f = 9
    g = 10
    h = 11
    i = 12
    j = 13
    k = 14
    l = 15
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l
    )
    
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a  >>> c = 6
    d = 7
    e = 8
    f = 9
    g = 10
    h = 11
    i = 12
    j = 13
    k = 14
    l = 15
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l
    )
    
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a     + c >>> d = 7
    e = 8
    f = 9
    g = 10
    h = 11
    i = 12
    j = 13
    k = 14
    l = 15
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l
    )
    
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a     + c + d    >>> e = 8
    f = 9
    g = 10
    h = 11
    i = 12
    j = 13
    k = 14
    l = 15
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l
    )
    
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a     + c + d     +     >>> f = 9
    >>> g = 10
    h = 11
    i = 12
    j = 13
    k = 14
    l = 15
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l
    )
    
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a     + c + d     +     g     +     j +>>> h = 11
    i = 12
    j = 13
    k = 14
    l = 15
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l
    )
    
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a     + c + d     +     g     +     j + k +    >>> i = 12
    j = 13
    k = 14
    l = 15
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l
    )
    
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a     + c + d     +     g     +     j + k +    
        x >>> j = 13
    k = 14
    l = 15
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l
    )
    
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a     + c + d     +     g     +     j + k +    
        x +    xz >>> k = 14
    l = 15
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l
    )
    
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a     + c + d     +     g     +     j + k +    
        x +    xz     x b >>> l = 15
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l
    )
    
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a     + c + d     +     g     +     j + k +    
        x +    xz     x b    x+   >>> print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l
    )
    
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a     + c + d     +     g     +     j + k +    
        x +    xz     x b    x+     x +   ...     x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l
    )
    
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a     + c + d     +     g     +     j + k +    
        x +    xz     x b    x+     x +   + g     x i    x+     x +    xz     x b    x+     x +   + g     x...     x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l
    )
    
    print(
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
        x + y + z + a     + c + d     +     g     +     j + k +    
        x +    xz     x b    x+     x +   + g     x i    x+     x +    xz     x b    x+     x +   + g     x i    x+     x +     x +    xz     x b    x+     x +   + g     x ...     x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
    ...     x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
    ...     x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
    ...     x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
    ...     x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
    ...     x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
    ...     x + y + z + a + b + c + d + e + f + g + h + i + j + k + l
    ... )
    1080
    >>> 
    >>> print(
    ...     x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
    ...     x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
    ...     x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
    ...     x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
    ...     x + y + z + a + b + c + d + e + f + g + h + i + j + k + l +
    ...     x + y + z + a     + c + d     +     g     +     j + k +    
    ...     x +    xz     x b    x+     x +   + g     x i    x+     x +    xz     x b    x+     x +   + g     x i    x+     x +     x +    xz     x b    x+     x +   + g     x i    x+     x + k + l
      File "<stdin>", line 8
        x +    xz     x b    x+     x +   + g     x i    x+     x +    xz     x b    x+     x +   + g     x i    x+     x +     x +    xz     x b    x+     x +   + g     x i    x+     x + k + l
                      ^
    SyntaxError: invalid syntax
    >>> )
      File "<stdin>", line 1
        )
        ^
    SyntaxError: unmatched ')'
    >>> 
    >>> 
    

    I am not sure how to fix this, but it would certainly be great if this issue could be resolved ASAP, as it is basically breaking my entire interactive Python workflow.

    Update: I think this issue might be exclusive to macOS, since I cannot reproduce it on Linux.

  17. edvilme commented on Sep 21, 2026

    @edvilme
  18. DetachHead commented on Oct 2, 2026

    @DetachHead

    this is now much more broken in python 3.15. opening the repl now causes it to spam this error:

    Traceback (most recent call last):
      File "/home/me/.local/share/uv/python/cpython-3.15.0rc2-linux-x86_64-gnu/lib/python3.15/_pyrepl/main.py", line 58, in interactive_console
        run_multiline_interactive_console(console)
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
      File "/home/me/.local/share/uv/python/cpython-3.15.0rc2-linux-x86_64-gnu/lib/python3.15/_pyrepl/simple_interact.py", line 165, in run_multiline_interactive_console
        r.refresh()
        ~~~~~~~~~^^
      File "/home/me/.local/share/uv/python/cpython-3.15.0rc2-linux-x86_64-gnu/lib/python3.15/_pyrepl/reader.py", line 895, in refresh
        base_screen = self.calc_screen()
      File "/home/me/.local/share/uv/python/cpython-3.15.0rc2-linux-x86_64-gnu/lib/python3.15/_pyrepl/reader.py", line 446, in calc_screen
        content_lines = self._build_content_lines(
            source_lines,
            prompt_from_cache=bool(offset and self.buffer[offset - 1] != "\n"),
        )
      File "/home/me/.local/share/uv/python/cpython-3.15.0rc2-linux-x86_64-gnu/lib/python3.15/_pyrepl/reader.py", line 554, in _build_content_lines
        prompt=build_prompt_content(prompt),
               ~~~~~~~~~~~~~~~~~~~~^^^^^^^^
      File "/home/me/.local/share/uv/python/cpython-3.15.0rc2-linux-x86_64-gnu/lib/python3.15/_pyrepl/content.py", line 97, in process_prompt
        prompt_text = unbracket(prompt, including_content=False)
      File "/home/me/.local/share/uv/python/cpython-3.15.0rc2-linux-x86_64-gnu/lib/python3.15/_pyrepl/utils.py", line 113, in unbracket
        return s.translate(ZERO_WIDTH_TRANS)
               ^^^^^^^^^^^
    AttributeError: 'PS1' object has no attribute 'translate'
    
  19. edvilme commented on Oct 2, 2026

    @edvilme

    Hello DetachHead
    can you please confirm what version of the extension are you using, as well as your OS and shell so that we can look more into this? Thanks!

  20. DetachHead commented on Oct 4, 2026

    @DetachHead

    can you please confirm what version of the extension are you using

    2026.6.0

    as well as your OS

    linux mint 22.3

    and shell

    bash


    also here's my settings.json:

    {
        "python.experiments.enabled": false,
        "telemetry.feedback.enabled": false
    }
  21. edvilme commented on Oct 5, 2026

    @edvilme

    Related python/cpython#131110
    Repl should convert sys.ps1 to string before passing the value for rendering

    this is now much more broken in python 3.15. opening the repl now causes it to spam this error:

    Traceback (most recent call last):
      File "/home/me/.local/share/uv/python/cpython-3.15.0rc2-linux-x86_64-gnu/lib/python3.15/_pyrepl/main.py", line 58, in interactive_console
        run_multiline_interactive_console(console)
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
      File "/home/me/.local/share/uv/python/cpython-3.15.0rc2-linux-x86_64-gnu/lib/python3.15/_pyrepl/simple_interact.py", line 165, in run_multiline_interactive_console
        r.refresh()
        ~~~~~~~~~^^
      File "/home/me/.local/share/uv/python/cpython-3.15.0rc2-linux-x86_64-gnu/lib/python3.15/_pyrepl/reader.py", line 895, in refresh
        base_screen = self.calc_screen()
      File "/home/me/.local/share/uv/python/cpython-3.15.0rc2-linux-x86_64-gnu/lib/python3.15/_pyrepl/reader.py", line 446, in calc_screen
        content_lines = self._build_content_lines(
            source_lines,
            prompt_from_cache=bool(offset and self.buffer[offset - 1] != "\n"),
        )
      File "/home/me/.local/share/uv/python/cpython-3.15.0rc2-linux-x86_64-gnu/lib/python3.15/_pyrepl/reader.py", line 554, in _build_content_lines
        prompt=build_prompt_content(prompt),
               ~~~~~~~~~~~~~~~~~~~~^^^^^^^^
      File "/home/me/.local/share/uv/python/cpython-3.15.0rc2-linux-x86_64-gnu/lib/python3.15/_pyrepl/content.py", line 97, in process_prompt
        prompt_text = unbracket(prompt, including_content=False)
      File "/home/me/.local/share/uv/python/cpython-3.15.0rc2-linux-x86_64-gnu/lib/python3.15/_pyrepl/utils.py", line 113, in unbracket
        return s.translate(ZERO_WIDTH_TRANS)
               ^^^^^^^^^^^
    AttributeError: 'PS1' object has no attribute 'translate'
    
  22. DetachHead commented on Oct 7, 2026

    @DetachHead

    different issue now (still exclusive to 3.15):

    a.mp4
  23. edvilme commented on Oct 7, 2026

    @edvilme

    This should already be fixed in the nightly build, but I can test further. In the meantime, try typing

    >>> import _pyrepl.simple_interact

    as that should refresh the regex needed for the calculations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-terminalbugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions