{"version":"2.1.327","anchor":"stdin-hook-input-gains-a-prefix","canonical_anchor":"stdin-hook-input-gains-a-prefix","heading":"Hooks receive an extra value before their input","tier":"internal","area":"Hooks","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.327\/e\/stdin-hook-input-gains-a-prefix","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.327","markdown":"### Hooks receive an extra value before their input\n\nClaude Code now writes an extra value ahead of the JSON input it sends to a hook, and handles output from hooks that succeed differently\n\n**Unclear.** What the extra value written before the JSON is, and whether hooks that read their input as plain JSON still work, is not clear.\n\n**What**\n\nA hook is a script you set up to run at certain points while Claude Code works. Claude Code passes it details as JSON on standard input, the stream a program reads its input from. Before, that input was only the JSON followed by a new line. Claude Code now writes an extra value in front of it. What a hook prints after it succeeds is now passed to a separate step inside Claude Code.\n\n**Why**\n\nIf you write hooks, this may change how your hook should read its input.\n\n- Area: Hooks\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}