{"version":"2.1.248","anchor":"hook-output-parsing-tells-you-what-was-wrong-with-it","canonical_anchor":"hook-output-parsing-tells-you-what-was-wrong-with-it","heading":"Hook output parsing tells you what was wrong with it","tier":"notice","area":"Hooks","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.248\/e\/hook-output-parsing-tells-you-what-was-wrong-with-it","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.248","markdown":"### Hook output parsing tells you what was wrong with it\n\nUnparseable hook output now shows the failure kind, exit code and stderr.\n\n**What**\n\nWhen a hook prints something Claude Code cannot read as JSON, the message now says which failure it was and includes the hook's exit code and stderr.\n\n**Details**\n\n- Parsing distinguishes plain text, valid JSON, several JSON documents run together, and output that looks like JSON but is not.\n- The last case advises using a real encoder: \"Emit the payload with a JSON encoder (jq, ConvertTo-Json, json.dumps) rather than string concatenation so backslashes and quotes inside strings are escaped.\"\n\n**Evidence**\n\n`Emit the payload with a JSON encoder (jq, ConvertTo-Json, json.dumps) rather than string concatenation so backslashes and quotes inside strings are escaped.`\n\n- Area: Hooks\n- Tier: You'll notice\n- Useful: 4\/5\n- Signal: 2\/5"}