{"version":"2.1.284","anchor":"hook-debug-log-now-separates-stdout-and-stderr-and-includes","canonical_anchor":"hook-debug-log-now-separates-stdout-and-stderr-and-includes","heading":"Hook debug log shows output and errors separately, with the exit code","tier":"notice","area":"Hooks","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.284\/e\/hook-debug-log-now-separates-stdout-and-stderr-and-includes","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.284","markdown":"### Hook debug log shows output and errors separately, with the exit code\n\nThe debug log now shows a hook's normal output and error output under separate labels, plus its exit code when it fails\n\n**What**\n\nHooks are your own commands that Claude Code runs at set moments, such as before a tool runs. When a hook fails or writes to its error stream, the debug log now shows:\n\n- a `stdout:` section with its normal output\n\n- a `stderr:` section with its error output\n\n- ` status code N` at the end when it failed, giving its exit code\n\nFailed hooks are logged at error level, others at debug level. A hook that fails without printing anything is now logged too. Before, the log showed only one kind of output, and only when there was some.\n\n**Why**\n\nBroken hooks are easier to debug: error output is no longer hidden behind normal output, and you can see the exit code. This appears in the debug log only, not on screen.\n\n- Area: Hooks\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5"}