{"version":"2.1.334","anchor":"edit-tool-failures-now-carry-structured-filerefusal-reasons","canonical_anchor":"edit-tool-failures-now-carry-structured-filerefusal-reasons","heading":"Failed edits and reads now say why, in a form programs can read","tier":"internal","area":"File Editing","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.334\/e\/edit-tool-failures-now-carry-structured-filerefusal-reasons","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.334","markdown":"### Failed edits and reads now say why, in a form programs can read\n\nEdit and Read failures now carry a reason such as a missing file or a folder, with a suggestion where one applies\n\n**Unclear.** What the new check on the target file before an edit enforces is not stated.\n\n**What**\n\nWhen the `Edit` tool cannot make a change, its error now includes a structured reason. For a missing file, for example, the reason is `file_not_found` and comes with a suggestion. A structured reason is a fixed label that another program can check, rather than only a sentence meant for a person.\n\nThe `Read` tool now tags its failures the same way:\n\n- `file_not_found`, with a suggestion\n\n- `is_folder`, when the path points to a folder rather than a file\n\n`Edit` also runs a new check on the target file before it applies a change.\n\n**Why**\n\nPrograms that run Claude Code, such as editor integrations and tools built on the SDK (the kit for building on top of Claude Code), can now tell why an edit or read failed without parsing the message text.\n\n- Area: File Editing\n- Names: `file_not_found`\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}