{"version":"2.1.285","anchor":"hook-stdio-completion-handling-hooks-with-incomplete-stdio","canonical_anchor":"hook-stdio-completion-handling-hooks-with-incomplete-stdio","heading":"Hooks whose output is cut short now fail instead of hanging","tier":"notice","area":"Hooks","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.285\/e\/hook-stdio-completion-handling-hooks-with-incomplete-stdio","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.285","markdown":"### Hooks whose output is cut short now fail instead of hanging\n\nHooks now wait for their output to finish after exiting, and fail with an \"output incomplete\" message if it was cut off\n\n**Unclear.** It is not clear exactly when Claude Code decides a hook's output was cut off.\n\n**What**\n\nA hook is a command you set up to run automatically at certain points while Claude Code works, such as before a tool runs. Claude Code reads what the hook prints. It used to wait until the hook's output channels closed. It now waits for the hook process to exit and then gives the output a moment to finish arriving.\n\nIf the output was cut off before it ended, the hook now fails. The message says the output is incomplete, that its output was cut before the end on this machine, and suggests a retry. For hooks on events that are able to block an action, this failure blocks the action. The handling of exit code 2, the code a hook uses to block, also takes cut-off output into account.\n\n**Why**\n\nA hook that starts a background program which keeps the output channel open should no longer leave Claude Code waiting forever. The trade-off is that a hook whose output is truncated now counts as a failure, and on blocking events that stops the action.\n\n- Area: Hooks\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 1\/5"}