{"version":"2.1.251","anchor":"writes-are-rejected-if-the-file-changed-after-the-preview","canonical_anchor":"writes-are-rejected-if-the-file-changed-after-the-preview","heading":"Writes are rejected if the file changed after the preview","tier":"notice","area":"File Tools","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.251\/e\/writes-are-rejected-if-the-file-changed-after-the-preview","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.251","markdown":"### Writes are rejected if the file changed after the preview\n\nA write is refused if the file changed since the preview you approved.\n\n**What**\n\nWhen a write is applied with a recorded content hash, Claude Code now re-hashes the file on disk first and refuses the write if the contents no longer match, so an edit you approved cannot silently clobber a change made in the meantime.\n\n**Details**\n\n- The internal write path takes a baseHash argument; the check runs whenever a caller supplies one.\n- On mismatch it throws instead of writing, reporting that the file changed since the edit was previewed.\n\n**Evidence**\n\n`file changed since the edit was previewed`\n\n- Area: File Tools\n- Tier: You'll notice\n- Useful: 4\/5\n- Signal: 3\/5"}