Frequent “Error editing file” on Update
Resolved 💬 19 comments Opened Aug 16, 2025 by musaev-haybulla Closed Aug 16, 2025
Recently, I have started to frequently experience the following error in Claude Code when trying to update files:
Update(add_poem_fragment.php)
⎿ Error editing file
⏺ Read(add_poem_fragment.php)
⎿ Read 10 lines (ctrl+r to expand)
The problem also occurs with other files. This happens even if I immediately try to update after reading (no apparent external modification). The “Read” command works (e.g., Read(add_poem_fragment.php)), but “Update” often fails, making it impossible to edit files reliably.
Why?? It's critical?
19 Comments
Found 2 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
this is also happening to me - just started today
Same error for me
same
same, and no more error messages
+1 the same error !
I also got that error very frequently and I asked Claude Code, here is its response:
This sounds plausible to me.
any idea on fixing that - guys?
I had this issue in the past, then it went away, and now today clause code is unusable, throwing this error over and over. I closed, reopened, tried a simple 'add one character to index' prompt and same issue.
currently completely broken.
Agree, happens every session for over a week. Burning usage.
Same for me, still hapenning, making claude code barely usable and causes issues - e.g. duplicated code - once it adds it using "update" and later has error anyway and appends it in end of file
Error editing file
Error reading file
Error... the file ops are broken
+1 same error
Same happening here. It is sporadic and seem random. File claude is trying to modify is never locked nor opened by another app.
Why this is an important issue is that CLAUDE does not seem to notice the error that it could not write the modifs. So we end up with partial/broken modifs at the end.
deleting the file and recreating it worked for me
I found that disabling vscode formatOnSave "fixes" it. It's not a long term solution, but I'm feeling like it's a race with file formatters and CC. I haven't tried running CC outside of vscode.
But absolutely, this problem comes and goes, and then it sort of gets past using cat or sed. It's a pretty big problem.
Any update on this? It's a real problem and as discussed on https://github.com/anthropics/claude-code/issues/6595 (which I think is a dup of this), it seems to have nothing to do with vscode's formatOnSave or prettier or anything like that.
same error for me! it really annoys me
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.