You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Python3.13 is mishandling OSC 633 sequences #126131
We have a custom pythonrc file that we set equal to user's PYTHONSTARTUP file and effectively override user's sys.ps1(this can be improved once we have the pre-exec hook mentioned in the related PR) This allows us to get features that VS Code shell integration offers.
With the new REPL that 3.13 offers, we have noticed that the cursor location is wrongly placed whenever REPL from Python3.13 is launched from our terminal. See:
After investigation we found out it is because Python3.13 is somehow handling our custom sequences such as
instead of ignoring them as it did in the previous versions of Python. This is what is leads to the wrong cursor location at the end. Removing these sequences brought back the cursor to the "right" position in terminal.
CPython should ignore these custom sequences instead of wrongly handling them.
Edit: Workaround could be temporarily disabling PyREPL via env var injection
exporting PYTHON_BASIC_REPL=1
Activity
[-]Python3.13 is wrongly handling OSC 633 sequences[/-][+]Python3.13 is mishandling OSC 633 sequences[/+]Tyriar commentedon Oct 29, 2024
To clarify, the problem is that any interpreter of escape sequences should be ignoring any OSC sequence it does not understand.
Fix) Prevent keyboard interrupt for Python3.13 REPL non-Windows (#24555)
Use sendText to send Python code to Terminal REPL for Python >= 3.13 (#…
Disable PyREPL (#25216)
anthonykim1 commentedon Nov 7, 2025
This should be resolved now, issue went away after wrapping with soh and stx in:
microsoft/vscode-python#25521