Hook Inputs & Outputs
Last updated
What is Hook Inputs & Outputs?
Hooks communicate via a standardized JSON interface: Inputs are passed to the hook via stdin, and Outputs are returned via stdout to influence the agent's next move. The input payload typically includes a context object containing session metadata and event-specific data, such as the tool name and its arguments (e.g., the exact code being written or command being run). To respond, your hook must return a JSON object.
Free resources to learn Hook Inputs & Outputs
- Official docsHook Inputs & Outputs
More in stage 9: Hooks
Hook Inputs & Outputs: common questions
Can I learn Hook Inputs & Outputs in Hindi?
This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain Hook Inputs & Outputs in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.
Is this Hook Inputs & Outputs tutorial for beginners?
It is lesson 69 of 109 in the free Claude Code roadmap, in stage 9, Hooks. If you are new to Claude Code, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.