{"version":"2.1.181","anchor":"file-write-verification-against-silent-truncation","canonical_anchor":"file-write-verification-against-silent-truncation","heading":"File Write Verification Against Silent Truncation","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.181\/e\/file-write-verification-against-silent-truncation","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.181","markdown":"### File Write Verification Against Silent Truncation\n\nAfter writing a file, Claude Code now stat()s the result and compares the on-disk size against the expected byte count. If they differ, it throws immediately rather than silently leaving a truncated file.\n\nThis catches a class of failure that commonly occurs on network drives, NFS mounts, and cloud-sync folders (Dropbox, OneDrive, etc.) where the OS kernel reports write success even though the backing store silently truncated the data.\n\nError text: `\"Write verification failed: <path> is <N> bytes on disk, expected <M>. The filesystem may have silently truncated the write (network drive \/ cloud sync).\"`\n\n**Evidence**\n\nPost-write check (search for `\"writeTextContent: on-disk size mismatch after write\"`) \u2014 `YSe()` at line ~55365"}