Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Actual behavior: Two errors appear:
“Edit attempted — Invalid arguments” popup when the agent’s edit tool tries to apply the change through the editor’s document model. The edit does not appear in the editor buffer. The agent falls back to writing via shell commands, which succeeds on disk but leaves the editor buffer stale.
“Received change text document command for closed file file:///c%3A/oooo/oooot/control.py” — appears intermittently alongside or instead of the first error, suggesting the editor’s internal document handle was recycled/closed before the edit command arrived.
After either error, the file on disk is correct (the fallback write works), but the editor tab shows stale content until manually reverted (Ctrl+Shift+P > Revert File).
Additional context:
The workspace uses Ruff with native server (“ruff.nativeServer”: “on”) and “files.autoSave”: “afterDelay”. Disabling the Ruff native server does not fix the “Invalid arguments” error — only suppresses the “closed file” popup while introducing a deprecation warning (legacy ruff-lsp is deprecated).
The file path on disk is a normal file — no symlinks, junctions, subst drives, or mapped drives. Path casing is consistent (C:\ooooo).
The error appears to be in the editor’s URI resolution layer when mapping the tool’s file path to the internal file:/// URI for the open document buffer on Windows.
Steps to Reproduce
Steps to reproduce:
Open a workspace on Windows (local, not remote) — e.g. C:\oooo
Open a Python file in the editor
Start an Agent session and ask it to edit the open file
The agent uses the StrReplace / edit tool targeting the file
Expected Behavior
Expected behavior: The edit is applied cleanly in the editor buffer. No error popups.
Operating System
MacOS
Version Information
Version: 2.6.19 (Universal)
VSCode Version: 1.105.1
Commit: 224838f96445be37e3db643a163a817c15b36060
Date: 2026-03-12T04:07:27.435Z (3 days ago)
Build Type: Stable
Release Track: Default
Electron: 39.4.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.2.0
Does this stop you from using Cursor
No - Cursor works, but with this issue