Hey, quick status update since January.
Hook support in the CLI has expanded. These hooks now work in the CLI: beforeShellExecution, afterShellExecution, afterFileEdit, postToolUse, stop, and sessionStart. The afterAgentResponse and afterAgentThought hooks still don’t work in the CLI, the team knows about this gap.
For --print mode there’s a useful workaround: the --output-format stream-json flag streams structured JSON events to stdout, including thinking deltas, the full assistant message, and a final result event with token usage and the request ID. It’s basically the same data you’d get from hooks, just via stdout.
Related thread with details: Hooks afterAgentResponse / afterAgentThought not firing in headless CLI
Which exact hook events do you need in --print mode? That’ll make it easier to suggest the best workaround.