feat(tmux-claude-attention): auto-jump to the Claude window that needs you #64
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
public/dotfiles-public!64
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/claude-autojump"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Auto-jump to the Claude window that needs you, plus pings that respect the upcoming
supsupervisor's verdict. This is Plan A of the Claude supervisor (design and plans: jmz/nixos-hosts#1174).What changes
tmux-claude-attention autojump WINDOW STATE, called from the status hook. It switches the most recently active client to a window that needs you:supisn't running, or onsup'sneeds-youverdict once it is.Guards against misplaced keystrokes and ping-pong. No jump while you:
Jumps are 20 s apart, best-ranked first. A last-moment re-check runs right before the switch.
With
supalive (@sup_heartbeat),notifyandaway-checkskip idle/waiting windowssupmarked handled or fine. Prompts always ping. New pseudo-stateneeds-you.Off switch:
tmux set -g @claude_autojump off. Tunables:@claude_autojump_idle(5),_retry(2),_tries(30),_cooldown(20),_idle_grace(30).Tests:
bash test/test-tmux-claude-attention.sh. 119 pass, 10 consecutive runs green, shellcheck clean. Private tmux server only.Known follow-ups, needed before
supships:needs-youchain is dropped by a later idle/waiting hook event whilesupis alive.if-shell -Fguard.🤖 Generated with Claude Code
https://claude.ai/code/session_01XMf4EJQB7AmgdaVhFXmDLq
- cmd_autojump: an idle/waiting event while sup is alive no longer kills a window's needs-you jump (Claude's idle_prompt ~60 s after Stop, while you type elsewhere): with @claude_verdict needs-you it keeps the seq and the running chain, mirroring the check's own rule. - The switch runs inside if-shell -F with a server-side guard on what the last-moment re-check read: same seq, still pending, not busy, not off, and the chosen client's client_activity unchanged (#{L:} client loop). The jump's writes and its message are in the same guarded list; a failed switch drops (seq-guarded), a false guard with the request still ours looks again. The display name is computed before the re-check, and the client name and message are sanitised for the command string. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XMf4EJQB7AmgdaVhFXmDLq