stderr

The channel on which a program writes its error messages. In hooks, what you write here reaches Claude as an explanation.

How it appears in the course

Yes. With 2, the error message written on stderr (the “error output”) reaches Claude as an explanation.

What does a hook receive, and what does it answer? · Module 07, Hooks: automatic actions

If the file name contains one of them, it writes the reason on stderr (>&2) and exits with exit 2 (stop). Otherwise, exit 0.

Ready-to-use recipes · Module 07, Hooks: automatic actions

Where you learn it

In module 07 · Hooks: automatic actions, in the Claude Code for Beginners course.

Related terms

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.