{"version":"2.1.307","anchor":"read-file-as-written-anchor-with-read-denied-error-code","canonical_anchor":"read-file-as-written-anchor-with-read-denied-error-code","heading":"Host programs can read a file by the path Claude wrote","tier":"use","area":"Agents","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.307\/e\/read-file-as-written-anchor-with-read-denied-error-code","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.307","markdown":"### Host programs can read a file by the path Claude wrote\n\nPrograms hosting Claude Code can now ask to read a file by the exact path Claude wrote, with refusals reported as read_denied\n\n**What**\n\nA host is a program that runs Claude Code and controls it with requests. One of those requests, `read_file`, asks Claude Code to read a file. It now accepts an `as_written` option, which looks the file up by the path exactly as Claude wrote it.\n\n- This works only when the host supplies the list of places those paths come from.\n\n- Any refusal comes back with a single error code, `read_denied`.\n\n- Files opened this way go through a stricter path check, which refuses links whose target climbs out of the allowed area.\n\n**Why**\n\nHosts can show or fetch a file by the path Claude used, while the usual safety checks on file access still apply.\n\n- Area: Agents\n- Names: `as_written`\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}