fix: increase SendKeys debounce to 500ms for reliable Enter key

The tmux send-keys Enter key was unreliable because SendKeys used only
100ms debounce while NudgeSession (known to work) uses 500ms.

Root cause: When agents start other agents or inject startup commands,
they use SendKeys() which had only 100ms debounce. This is insufficient
for Claude Code to process the paste before Enter arrives.

The fix increases DefaultDebounceMs from 100ms to 500ms, making all
SendKeys calls as reliable as NudgeSession calls.

Fixes: hq-y9id

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
nux
2026-01-03 13:10:58 -08:00
committed by Mike Lady
parent fc805595bb
commit f972c69f3a

View File

@@ -17,7 +17,9 @@ const (
ShellReadyTimeout = 5 * time.Second
// DefaultDebounceMs is the default debounce for SendKeys operations.
DefaultDebounceMs = 100
// 500ms is required for Claude Code to reliably process paste before Enter.
// See NudgeSession comment: "Wait 500ms for paste to complete (tested, required)"
DefaultDebounceMs = 500
// DefaultDisplayMs is the default duration for tmux display-message.
DefaultDisplayMs = 5000