What
Claude Code has several new safeguards for writing files:
- Copying a file can now be refused when the source has a second name. A second name is a hard link, meaning two paths point to the same file. The error says "it has a second name (a hard link)".
- Some writes go to a temporary staging location first and are then moved into place. If that move fails because the two locations are on different disks, Claude Code now retries without the staging location when the sandbox may be off. The sandbox is the restricted environment some commands run in.
- Adding to the diagnostics log can now refuse targets that are symbolic links, hard links or anything that is not a plain file. This is behind a remote switch.
Why
This makes file writes harder to redirect with link tricks, where a link makes a write land somewhere it was not meant to.