Output

What a program prints or returns after it runs: a text, a result, an error message.

You’ll also find it as: outputs

How it appears in the course

For finer control, the hook can write a JSON answer on stdout (“standard output”, where a program writes its normal result). For example, "decision": "block" with a "reason" (the reason for blocking). Or additionalContext, to give Claude extra information.
What does a hook receive, and what does it answer? · Module 07, Hooks: automatic actions
--output-format json asks for the answer as a “form”.
What is JSON, and why would you want it? · Module 10, Claude on autopilot
With --output-format json you get a “form” with the answer, the cost and the session_id.
Key takeaways · Module 10, Claude on autopilot

Learn Claude Code from zero, in plain English

12 modules with 1–2 minute lessons, which you can also do on your phone. The first two modules are free.