Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
When editing large Python files (1000+ lines) with complex local imports on a remote SSH server, the Python language server frequently throws “Received redundant open text document command” and “Received change text document command for closed file” errors. This appears to be a race condition, happening more often when Cursor Tab completion is active. The issue does not occur on new, simple files without local project imports.
A log like this:
[Info - 19:06:46] basedpyright language server 1.31.3 starting
[Info - 19:06:46] Server root directory: file:///[USER_PATH]/.cursor-server/extensions/anysphere.cursorpyright-1.0.9/dist
[Info - 19:06:46] Starting service instance “main”
Received pythonPath from Python extension: [USER_PATH]\AppData\Local\Programs\Python\Python312\python.exe
[Info - 19:06:46] Setting pythonPath for service “main”: “[USER_PATH]\AppData\Local\Programs\Python\Python312\python.exe”
[Info - 19:06:46] No include entries specified; assuming [USER_PATH]\Desktop\HuanmengX\main
[Info - 19:06:46] Auto-excluding **/node_modules
[Info - 19:06:46] Auto-excluding **/pycache
[Info - 19:06:46] Auto-excluding */.
[Info - 19:06:46] Assuming Python version 3.12.10.final.0
[Info - 19:06:48] BG: Background analysis(1) root directory: file:///[USER_PATH]/.cursor-server/extensions/anysphere.cursorpyright-1.0.9/dist
[Info - 19:06:48] BG: Background analysis(1) started
[Info - 19:06:54] Auto-excluding [USER_PATH]\Desktop\HuanmengX\main\Data\PeopleSet_Generation\venv
[Info - 19:06:58] BG: [BG(1)] Long operation: checking: file:///[USER_PATH]/Desktop/HuanmengX/main/Plugins/BJD_PlayerTop.py (5254ms)
[Info - 19:06:58] BG: [BG(1)] Long operation: analyzing: file:///[USER_PATH]/Desktop/HuanmengX/main/Plugins/BJD_PlayerTop.py (6223ms)
[Info - 19:06:59] Found 134 source files
[Info - 19:08:27] BG: [BG(1)] Long operation: checking: file:///[USER_PATH]/Desktop/HuanmengX/main/Plugins/BJD_PlayerTop.py (2575ms)
[Info - 19:08:27] BG: [BG(1)] Long operation: analyzing: file:///[USER_PATH]/Desktop/HuanmengX/main/Plugins/BJD_PlayerTop.py (2651ms)
[Info - 19:08:47] BG: [BG(1)] Long operation: checking: file:///[USER_PATH]/Desktop/HuanmengX/main/Plugins/BJD_Serverless.py (3187ms)
[Info - 19:08:47] BG: [BG(1)] Long operation: analyzing: file:///[USER_PATH]/Desktop/HuanmengX/main/Plugins/BJD_Serverless.py (3229ms)
[Error - 19:08:57] Received redundant open text document command for file:///[USER_PATH]/Desktop/HuanmengX/main/Plugins%5CBJD_Serverless.py
[Info - 19:09:22] BG: [BG(1)] Long operation: analyzing: file:///[USER_PATH]/Desktop/HuanmengX/main/Plugins/BJD_Serverless.py (2004ms)
Steps to Reproduce
- Connect to a remote server (e.g., Windows Server over SSH) using Cursor.
- Open a workspace containing a Python project with multiple interdependent files.
- Open a large Python file (>1000 lines) that uses wildcard imports (from .module import *) to import code from other local files in the project.
- Immediately after the file opens, start typing or editing the code.
- Observe the error notification from the Python language server within a few minutes.
Expected Behavior
The Python language server should initialize and analyze the file smoothly without throwing synchronization errors, regardless of the file size, import complexity, or how quickly I start editing after opening the file. All editor features, including Cursor Tab completion, should function without causing conflicts with the language server’s file state.
Even if the Cursor Tab is closed, this issue still occurs, but the probability of it happening is much higher when the Cursor Tab is open.
Screenshots / Screen Recordings
Operating System
Windows 10/11
Current Cursor Version (Menu → About Cursor → Copy)
Version: 1.7.28 (system setup)
VSCode Version: 1.99.3
Commit: adb0f9e3e4f184bba7f3fa6dbfd72ad0ebb8cfd0
Date: 2025-10-01T02:45:21.769Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
Additional Information
When I downgraded the Cursor IDE to version 1.2.4, the issue did not occur. This problem started appearing after I upgraded the Cursor IDE to version 1.5.
Before reporting this issue, I tried replacing the Python extension (forked with basedpyright) with other similar extensions that check Python syntax, such as BasedPyright, but the problem persisted with all of them.
Does this stop you from using Cursor
No - Cursor works, but with this issue
