VSCode: Biome shows incorrect lint errors when files are changed externally #10095
Replies: 1 comment 2 replies
-
|
This is a known LSP buffer synchronization issue that occurs when files are modified externally while VSCode has them open. What's happening under the hood: When your AI agent writes to a file on disk, VSCode detects the change via its file system watcher. If the file has no in-editor unsaved changes, VSCode silently reloads the disk version. But when there is any in-memory buffer state — even just cursor position or undo history — VSCode may keep its stale buffer rather than reloading, and then sends that stale content to the Biome language server via Workarounds (in order of effectiveness): 1. Use "Revert File" instead of Cmd+Z + Cmd+S
2. Configure VSCode to auto-reload externally changed files Add this to your {
"files.hotExit": "off"
}And ensure your workspace does not have unsaved changes that would block the auto-reload prompt. 3. Save before your AI agent runs If you can hook into your Codex agent's workflow, trigger a 4. Enable autosave with a short delay {
"files.autoSave": "afterDelay",
"files.autoSaveDelay": 500
}This keeps the editor buffer closer to disk state, reducing the window where a desync can occur. Is this a Biome bug? Partially. Biome's LSP extension should handle |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, every day I run into this issue: Whenever my external Codex AI agent modifies code I'm working on in VSCode, Biome gets stuck and some ghost errors. When I press
Cmd+S, sometimes they resolve, sometimes they get even worse.In this video, you can see some incorrect lint errors. I hit
Cmd+S, and some additional ghost code appears, that is completely broken. Then I hitCmd+ZandCmd+Sagain, and then it's finally correct.Any idea what is causing this and how I can solve it?
Bildschirmaufnahme.2026-04-23.um.10.34.23.mov
Edit: I also get this when git changes files, e.g. by reseting or pulling. Biome console says:
Beta Was this translation helpful? Give feedback.
All reactions