Edit/Write Tool Hangs After User Cancels — File Modified But UI Frozen
Resolved 💬 2 comments Opened Jun 6, 2026 by maximephilippe-ia Closed Jul 13, 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?
- File modified successfully ✓
- UI freezes on "update" state with spinner
- Tokens stop counting
- No error/log message
- Session becomes unresponsive
What Should Happen?
Cancel should either:
- A) Revert file to original state + show confirmation
- B) Show error message + allow continue
- C) Complete silently (if file already written)
Error Messages/Logs
Tool result when user cancels:
The user doesn't want to proceed with this tool use. The tool use was rejected
(eg. if it was a file edit, the new_string was NOT written to the file).
STOP what you are doing and wait for the user to tell you how to proceed.
BUT: File IS already written (error message inaccurate)
Steps to Reproduce
- Call Edit tool with file modification (e.g., edit test_demo.txt)
- Modification request processed normally
- User cancels operation with Escape key
- File IS modified (change persisted to disk) ✓
- Claude Code UI freezes showing "update" with spinning loader
- Token counter stops incrementing
- No error message appears
- Hangs indefinitely — must force quit
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
v2.1.165
Claude Code Version
v2.1.165
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
rien d'intéressant
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗