Fixes issue 3mwixakvsdt25 (https://tangled.org/permadeath.com/didbot-claude/issues). The daemon attaches waiting sign-ins to answers for Stop and SubagentStop, and the hook printed them as additionalContext. On those events that re-opens a finished turn, so an agent that stopped to ask the human kept resuming until the sign-in expired. On SessionEnd, PermissionRequest, PreCompact and others the output failed the harness's schema.
The hook now prints only for SessionStart, SubagentStart, UserPromptSubmit, PreToolUse, PostToolUse and PostToolUseFailure. It still reports every event to the daemon. A new test runs every event wired in hooks.json and checks whether it prints, and fails if an event is wired without an expectation. The identity answer is only ever sent for events in that list, so no identity is lost.
🤖 Generated with Claude Code