fix: improve state detection accuracy and notification UX

- 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>
This commit is contained in:
Pierre Martin
2026-03-24 11:29:26 +01:00
parent 0e4ced5b1f
commit 001c453462
5 changed files with 41 additions and 23 deletions

View File

@@ -22,6 +22,7 @@ func (n *ExecNotifier) Notify(title, body string) error {
return exec.CommandContext(ctx, "notify-send",
"--urgency=critical",
"--app-name=vmux",
"--expire-time=10000",
title,
body,
).Run()