[BUG] Claude Code In IDEA\WebStore\Rider-Error: File has been unexpectedly modified. Read it again before attempting to write it
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?
When I upgraded Claude Code to version 2.0.1, I suddenly found that every time Claude Code needed to modify files using git and I accepted the modification, an Error would occur: File has been unexpectedly modified. Read it again before attempting to write it. I suspect that IDEA or some plugin in it modified the source file again before Claude Code was ready to modify the code, resulting in inconsistent calculation of the patch (diff/patch). I tried to uninstall and disable all installed plugins or restore the entire Settings, but the above-mentioned abnormal problem occurred. Now I can't use Claude Code in IDEA. I can only use the MCP Server and let Claude Code directly modify the file. This problem emerged only after I upgraded Claude Code.
I want to know if this issue is related to IDEA or some of its plugins. Right now, I'm completely unable to use IDEA to work properly。If you need more information, I can provide it at any time. Please let me know immediately. Thank you very much。
<img width="986" height="403" alt="Image" src="https://github.com/user-attachments/assets/b60fe210-697e-4adf-836d-49e4949c1dda" />
What Should Happen?
After I accept it, I should be able to modify the file successfully
Error Messages/Logs
Error: File has been unexpectedly modified. Read it again before attempting to write it
Steps to Reproduce
- Start a brand-new IDEA
- Import my configuration setting.zip
- Enable all plugins
- Try to write a file with a mapper interface and xml
- Have Claude Code modify the above-mentioned file
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
1.0.100
Claude Code Version
2.0.1
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
This is all the Settings of IDEA settings.zip
You need to import this configuration to reproduce the problem
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗