[BUG] VS Code Extension; Code Edits Don't Sync
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
I use VS code to write and compile my LaTeX documents. The new claude-code extension for VS code works great for this, because Claude really helps with editing LaTeX documents.
However, sometimes after Claude makes edits these don't get applied to the main.tex file. If you try to compile or save the main.tex, the error appears,
"Failed to save 'main.tex': The content of the file is newer. Please compare your version with the file contents or overwrite the content of the file with your changes."
If you try to overwrite, the "overwrite" doesn't actually overwrite the the changes Claude made.
What Should Happen?
Claude should be able to see edits made to main.tex even if the file has not been recompiled since then.
Error Messages/Logs
Failed to save 'main.tex': The content of the file is newer. Please compare your version with the file contents or overwrite the content of the file with your changes.
Steps to Reproduce
Open a LaTeX file with the VS code LaTeX editor. Make some changes to the file, _but do not compile or build the project!_ Claude won't see these changes on Claude's end. Then, when Claude tries to make changes it will be de-synced. If you press "overwrite" this doesn't actually apply Claude's edits (as desired.)
The way to avoid this is to just always remember to compile/build before having Claude make new edits, but this it is inconvenient to recompile after every tiny edit.
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.8 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
It is pretty easy to reproduce the bug
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗