What
A tool call is one action Claude takes, such as reading or writing a file. When a call is refused or does not run, Claude Code now attaches structured details saying why, instead of leaving that only in message text.
refused_bysays whether a rule, a hook (a command you set up to run automatically) orauto_moderefused the call.file_refusalgives the reason a file tool refused.input_invalidmarks a call that did not run because its input was invalid.uploaded_filesis also recorded on the tool result.- These are marked
@internalin the SDK message schema, the format programs that embed Claude Code receive. - The record of each tool result now holds these alongside the existing
remedy,input_changedandpermission_decision, and drops aremedythat conflicts with a plugin rewrite. - The file write check now tells apart a file that was never read from one that changed after it was read, with a different message for each, and returns a
fileRefusalcode with every refusal. - When an internal condition is true, or a file is named during compaction (when Claude Code summarises a long conversation to free space), the write check keeps the reads made before compaction and compares them with the file's current content. That comparison decides whether the write is allowed.
Before, the write check had a single "read it first" message.
Why
Programs built on Claude Code can tell why a tool call was refused without parsing text. For people editing files in long conversations, writes after compaction are now judged against what was read before it, and a refused write says which of the two problems it hit.