[BUG] Claude Code crashes when reading/writing a file that is being modified by external process (e.g., node file watcher)

Resolved 💬 4 comments Opened Nov 28, 2025 by ecetianxin Closed Jan 27, 2026

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?

happen quite often, it will 100% crash the same point if re-try. crash 5 times in a row, until I ask claude to try something else.

  • - - Issue: Claude Code crashes when reading/writing a file that is being modified by external process (e.g., node file watcher)
  • Reproduction: Have a dev server running with hot-reload, attempt to edit a watched file
  • Expected: Graceful error handling
  • Actual: Repeated crashes, context loss

What Should Happen?

not crash no matter what.

Error Messages/Logs

Steps to Reproduce

i dont know how, this is during my project.

Root Cause Analysis

  1. File was being modified externally - Most likely a running node process with hot-reload/file watcher was modifying the file between my read and

write operations

  1. I didn't kill the node processes first - The command taskkill //F //IM node.exe was attempted but may not have completed before I tried reading

again

  1. I kept retrying the same approach - Instead of:
  • Waiting for the kill to complete
  • Reading in smaller chunks
  • Checking if any process was locking the file

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

Claude Code v2.0.55 Opus 4.5 · Claude Max

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗