Follow Discord
Sweep 22 Sep 2026 · 17:19Z Build v2.1.280 501 read Stable v2.1.267 Latest v2.1.280 Next v2.1.280 Feeds RSS JSON llms.txt Unofficial
Claude Code v2.1.277 ·

Write tool gives specific errors for directories and special files

The Write tool now gives clear errors instead of failing vaguely when the target is a directory or a device/socket

TierYou'll noticehow much it should matter to you
Useful2my rating, 1 to 5
Signal1worth watching, 1 to 5
AreaFile Toolswhat it touches
KindImprovementsin v2.1.277,
You'll notice

The Write tool now gives clear errors instead of failing vaguely when the target is a directory or a device/socket

What

The Write tool, which creates or overwrites files, used to only check whether the target path was a symlink before writing. It now also checks for two more cases:

  • the target path is a directory, in which case it reports that it's a directory and suggests including a file name in file_path to create a file inside it
  • the target path is a non-regular file, such as a device, FIFO, or socket, which it now refuses to overwrite, noting that Write only creates or overwrites regular files

Each case gets its own distinct error rather than a generic failure.

Why

This gives clearer feedback when Write is pointed at something other than a plain file, instead of a confusing or misleading error.

See this entry in the whole of v2.1.277 →

Feedback