[BUG] Write/Edit tools hang for 10-20 minutes (infinetely before stoped manually) before returning result

Resolved 💬 2 comments Opened May 21, 2026 by itJunky Closed May 21, 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?

Claude Code version: 2.1.146
Platform: Linux 6.1.0-39-amd64 (Debian Bookworm)
Shell: bash / fish

---

### Description

The Write and Edit built-in tools frequently hang for 10–20 minutes before i stoped it and
returning control to the conversation. The hang is not deterministic — it
affects files of any size (including small config files < 1 KB) and occurs
across different directories and project types. After escaping it show diff instantly.

---

### Observed behavior

  • The file is written successfully to disk (confirmed: canceling after the

hang shows the correct diff of changes)

  • The hang occurs after the file write completes — the tool does not return

its result to the conversation for an extended period

  • Bash tool with explicit timeout: 600000 works reliably; the issue is

specific to Write/Edit built-in tools which have no timeout parameter

  • No git lock files present (.git/*.lock checked)
  • No other processes holding open file descriptors on the target directory

(verified with lsof +D <dir>)

  • No Docker containers running during the hang
  • The issue was present before any third-party plugins (e.g. oh-my-claudecode)

were installed, ruling out hook-related causes

---

What Should Happen?

Write/Edit tools should return immediately after the file is written to disk,
consistent with the behavior of Bash tool operations.

Error Messages/Logs

No errors and claude can't understand what is really going on. Not understand when he freezed.

Steps to Reproduce

  1. Use Claude Code in a standard Linux terminal session
  2. Ask Claude to write or edit any file using the built-in Write or Edit tool
  3. Observe that the tool appears to freeze after the file is written to disk
  4. After 10–20 minutes the operation unblocks when user manually

cancels via double ESC

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.146

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

  • Terminal is terminator
  • The pattern is: tool executes → file written → hang → manually unblocks

when user cancels → diff shown confirming write succeeded

  • The hang duration is variable: observed between 5 and 20 minutes
  • Reproducible on a plain ext4 filesystem, no NFS or network mounts involved
  • System load during hang is minimal (no heavy I/O or CPU activity)

View original on GitHub ↗

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