{"version":"2.1.331","anchor":"publish-and-write-files-add-a-hardlinkidentity-recheck-on-r","canonical_anchor":"publish-and-write-files-add-a-hardlinkidentity-recheck-on-r","heading":"File writes refuse a path that turns out to be a hardlink or a different file","tier":"notice","area":"File Writes","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.331\/e\/publish-and-write-files-add-a-hardlinkidentity-recheck-on-r","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.331","markdown":"### File writes refuse a path that turns out to be a hardlink or a different file\n\nWhen a file path resolves somewhere else, Claude Code rechecks the original and refuses if it has hardlinks or is not the same file\n\n**Unclear.** It is not clear whether this recheck always runs or only under a condition.\n\n**What**\n\nWhen `write_files` is given a path that resolves to a different location on disk, Claude Code now checks the original path again before going ahead. It refuses to continue if:\n\n- the file has hardlinks, meaning other names on disk that point to the same file\n\n- the original path turns out to be a different file from the resolved one\n\nPublishing an artifact now also keeps track of each spelling of a path that was approved, not only the resolved one. Previously the original path was not checked again.\n\n**Why**\n\nThis tightens file access. A path that looked approved can no longer be used to reach a file outside the folder you allowed.\n\n- Area: File Writes\n- Names: `write_files`\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: yes"}