If you’ve suddenly started hitting the File has been unexpectedly modified error with Claude, you’re not going crazy (Well, maybe you are a little, thanks to this bug). It’s a recent bug that seems to have popped up for many developers just a couple of weeks ago.

This appears to be a fickle bug with behavior that changes depending on the situation, the user, and even the time of day. This post isn’t a declaration of a single “correct” solution. Instead, it’s a guide to share the collective knowledge from the community and my own evolving experience with this bug.

Claude Code Error

When this bug hit, it felt like someone just cut off my hands - I couldn’t do anything. One Claude crash and suddenly I’m useless, so this is what a Single Point of Failure feels like.

Claude even came up with its own “fix” by having me manually patch files in bash, which felt both ridiculous and like a total token drain. At one point I started copy-pasting Claude’s suggestions myself, basically becoming a human Ctrl+C/Ctrl+V pipeline… and that’s when the existential crisis hit. So this is what a Single Point of Failure feels like. Guess I need a backup personality next time.


🕵️‍♂️ The Bug’s Identity: GitHub Issue #7443

At the heart of this problem is GitHub Issue #7443. The community discussion there can be summarized as follows:

  • Known Issue: It’s a critical regression bug that appeared in Claude Code version 1.0.111.
  • Primary Symptom: The Edit tool fails and is unable to modify files.
  • Current Status: As of this writing, there is no official fix, and the issue remains open.

💡 Community-Sourced Workarounds (Things to Try)

While there’s no official patch, developers around the world have shared various workarounds. Try these one by one to see what works for you.

1. Use Relative Paths

This was the first and most widely reported workaround. When the bug first surfaced, many developers (including me) found success with this method. Add this to your CLAUDE.md files.

## File Path Rules (Workaround for Claude Code v1.0.111 Bug)
- When reading or editing a file, **ALWAYS use relative paths.**
- Example: `./src/components/Component.tsx`- **DO NOT use absolute paths.**
- Example: `C:/Users/user/project/src/components/Component.tsx`- Reason: This is a workaround for a known bug in Claude Code v1.0.111 (GitHub Issue #7443)

2. Downgrade to Version 1.0.100

Rolling back to the last known stable version is another reliable option.

npm install -g @anthropic-ai/claude-code@1.0.100

3. Disable IDE File Watchers

Some developers have suggested that IDE features like formatOnSave or autoSave could be conflicting with Claude’s file-editing process. Try disabling them temporarily.

// .vscode/settings.json
{
  "editor.formatOnSave": false,
  "files.autoSave": "off"
}

4. Pro tip

I know you’re A VIBE CODER. Just Give your Claude agent the URL of this blog post and tell it: “You seem to be hitting a known bug. Follow the instructions in this guide to resolve it.”


⚠️ Important Update

When I first wrote about this issue, using relative paths was a 100% reliable fix for me. However, as of updating this post, both absolute and relative paths are working perfectly fine in my environment.

There are a couple of possible explanations for this:

  1. A silent hotfix may have been pushed to Claude Code in the background.

  2. The bug itself might only be triggered under very specific conditions (e.g., certain project types, conflicting IDE extensions).


🤔 So, What Should We Do?

Given the fluid state of this bug, here is my recommended course of action:

1. First: Before trying anything else

Just try to edit a file using both absolute and relative paths. The issue might already be resolved for you.

2. If It Fails: Go through the list of Community Workarounds

Try them one by one.

3. Check for Updates

The most reliable source of truth is the official GitHub issue. If you want to know the latest status, keep an eye on that thread.


I hope one of the methods outlined in this post helps you solve your problem. Good luck to all of us in the battle against this ever-changing bug!


Also available on: Medium

Related: GitHub Issue #7443