[Bug] Edit tool fails with "File has been unexpectedly modified" error on valid file operations
Resolved 💬 3 comments Opened Dec 20, 2025 by ChrisColeTech Closed Dec 23, 2025
Bug Description
● Read(giga-images-v2\scripts\convert_v6_safetensors_to_gguf.py)
⎿ Read 10 lines
● Update(giga-images-v2\scripts\convert_v6_safetensors_to_gguf.py)
⎿ Error: File has been unexpectedly modified. Read it again before attempting to write it.
● This is a Claude Code internal issue - no external process is modifying the file, but the Edit tool keeps failing. Let me use sed as a workaround.
Environment Info
- Platform: win32
- Terminal: null
- Version: 2.0.74
- Feedback ID: 3ee4db1a-6bd6-4ca0-a3e1-5cae4b798bb6
Errors
[{"error":"Error: Request was aborted.\n at _0A._createMessage (file:///C:/nvm/v20.19.3/node_modules/@anthropic-ai/claude-code/cli.js:514:3157)","timestamp":"2025-12-20T03:41:05.180Z"},{"error":"MaxFileReadTokenExceededError: File content (72513 tokens) exceeds maximum allowed tokens (25000). Please use offset and limit parameters to read specific portions of the file, or use the GrepTool to search for specific content.\n at CdB (file:///C:/nvm/v20.19.3/node_modules/@anthropic-ai/claude-code/cli.js:1018:12169)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async Object.call (file:///C:/nvm/v20.19.3/node_modules/@anthropic-ai/claude-code/cli.js:1027:996)\n at async tg5 (file:///C:/nvm/v20.19.3/node_modules/@anthropic-ai/claude-code/cli.js:2207:17438)","timestamp":"2025-12-20T03:41:16.643Z"},{"error":"Error: Request was aborted.\n at OT.makeRequest (file:///C:/nvm/v20.19.3/node_modules/@anthropic-ai/claude-code/cli.js:857:3940)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-12-20T03:43:49.436Z"},{"error":"Error: File has been unexpectedly modified. Read it again before attempting to write it.\n at Object.call (file:///C:/nvm/v20.19.3/node_modules/@anthropic-ai/claude-code/cli.js:1873:754)\n at async tg5 (file:///C:/nvm/v20.19.3/node_modules/@anthropic-ai/claude-code/cli.js:2207:17438)","timestamp":"2025-12-20T03:47:07.524Z"},{"error":"Error: Request was aborted.\n at OT.makeRequest (file:///C:/nvm/v20.19.3/node_modules/@anthropic-ai/claude-code/cli.js:857:3940)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-12-20T03:47:13.604Z"},{"error":"Error: File has been unexpectedly modified. Read it again before attempting to write it.\n at Object.call (file:///C:/nvm/v20.19.3/node_modules/@anthropic-ai/claude-code/cli.js:1873:754)\n at async tg5 (file:///C:/nvm/v20.19.3/node_modules/@anthropic-ai/claude-code/cli.js:2207:17438)","timestamp":"2025-12-20T04:03:17.612Z"},{"error":"Error: Request was aborted.\n at _0A._createMessage (file:///C:/nvm/v20.19.3/node_modules/@anthropic-ai/claude-code/cli.js:514:3157)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-12-20T04:03:21.605Z"},{"error":"Error: Request was aborted.\n at _0A._createMessage (file:///C:/nvm/v20.19.3/node_modules/@anthropic-ai/claude-code/cli.js:514:3157)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-12-20T04:04:59.221Z"},{"error":"Error: Request was aborted.\n at _0A._createMessage (file:///C:/nvm/v20.19.3/node_modules/@anthropic-ai/claude-code/cli.js:514:3157)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-12-20T04:05:37.007Z"},{"error":"Error: Request was aborted.\n at OT.makeRequest (file:///C:/nvm/v20.19.3/node_modules/@anthropic-ai/claude-code/cli.js:857:3940)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)\n at runNextTicks (node:internal/process/task_queues:64:3)\n at listOnTimeout (node:internal/timers:545:9)\n at process.processTimers (node:internal/timers:519:7)","timestamp":"2025-12-20T04:10:40.359Z"},{"error":"Error: File has been unexpectedly modified. Read it again before attempting to write it.\n at Object.call (file:///C:/nvm/v20.19.3/node_modules/@anthropic-ai/claude-code/cli.js:1873:754)\n at async tg5 (file:///C:/nvm/v20.19.3/node_modules/@anthropic-ai/claude-code/cli.js:2207:17438)","timestamp":"2025-12-20T04:11:21.044Z"},{"error":"Error: File has been unexpectedly modified. Read it again before attempting to write it.\n at Object.call (file:///C:/nvm/v20.19.3/node_modules/@anthropic-ai/claude-code/cli.js:1873:754)\n at async tg5 (file:///C:/nvm/v20.19.3/node_modules/@anthropic-ai/claude-code/cli.js:2207:17438)","timestamp":"2025-12-20T04:11:32.160Z"},{"error":"Error: Shell b4fb5c6 is not running, so cannot be killed (status: killed)\n at Object.call (file:///C:/nvm/v20.19.3/node_modules/@anthropic-ai/claude-code/cli.js:2890:1851)\n at runNextTicks (node:internal/process/task_queues:60:5)\n at process.processImmediate (node:internal/timers:454:9)\n at process.topLevelDomainCallback (node:domain:161:15)\n at process.
Note: Error logs were truncated.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗