- Hook reads JSON from stdin (not env vars) matching Claude Code protocol
- end_turn = Idle (not NeedsInput); real questions come from hooks
- Permission prompt (stale tool_use) never becomes Idle
- Notifications auto-expire after 10s (--expire-time)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- vmux setup: idempotently adds hooks to ~/.claude/settings.json
- vmux hook: receives Claude Code hook events via env vars and forwards to daemon
- Daemon handles "hook" action on Unix socket (no HTTP server needed)
- Hooks provide instant state detection (permission/question/idle)
- Notifier + FocusTimer fields in Daemon, initialized in NewDaemon
- processHookEvent notifies on Working -> Needs Input only (D-01)
- Focus mode suppresses notifications when active (D-05)
- FocusArgs in protocol, "focus" handler in daemon
- CLI "vmux focus <minutes>" command
- Tests for all notification transitions and focus handler
- TailReadJSONL: reverse-read JSONL without loading entire file
- FindSessionForProcess: match PID to most recent JSONL via EncodePath
- DetectState: heuristic based on last message stop_reason + tool name
- ExtractPreview: extract first 3 lines of last assistant text
- All 17 tests pass (session_test.go + state_test.go)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>