Claude Code v2.1.223 ·
Atomic file writes no longer copy through the temp file on the fallback path
File writes are safer on the fallback path and refuse to follow a symlink at the destination.
You'll noticeTier: how much it should matter to you
3Useful: my rating, 1 to 5
0Signal: worth watching, 1 to 5
File WritesArea: what it touches
Bug FixesKind: in v2.1.223,
Bug FixesSection of the release
What
When rename fails, the atomic-write fallback now writes content straight to the destination instead of copying the temp file over it.
Details
- applies to both the sync and async fallbacks
- the destination is opened with
O_WRONLY|O_CREAT|O_TRUNC|O_NOFOLLOW, so a symlink at the path is refused rather than followed - permissions are applied by chmod on the open descriptor
- on failure the descriptor is closed and the partial destination is unlinked
Evidence
U1.constants.O_NOFOLLOW
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
See this entry in the whole of v2.1.223 →