diff --git a/bin/rclaude b/bin/rclaude index 41991be..ab9f3e0 100755 --- a/bin/rclaude +++ b/bin/rclaude @@ -829,6 +829,15 @@ cmd_list() { # a leading `/` is just text — easy to accidentally turn a slash # command into prose. # +# Multi-line / long payloads arrive as a bracketed paste: Claude's TUI buffers +# them as a "[Pasted text]" block that needs an explicit submit. A trailing +# Enter sent immediately after the literal text is swallowed into the paste +# (treated as a newline, not a submit), so the turn silently never submits — +# the input just accumulates across sends. A short pause before Enter lets the +# paste settle so the Enter registers as a submit. Single-line sends (e.g. the +# orchestrator cold-start kick) were unaffected, which is why this only bit +# long turns like the rounds prompt. +# # Concurrent sends to the same pane can still race the input buffer. Callers # that need ordering should serialize externally (flock on a per-pane lock). cmd_send() { @@ -926,7 +935,7 @@ EOF if is_local "$_host"; then if tmux send-keys -t "$_sess" C-a C-k 2>/dev/null \ && tmux send-keys -t "$_sess" -l -- "$_text" 2>/dev/null \ - && tmux send-keys -t "$_sess" Enter 2>/dev/null; then + && { sleep 0.5; tmux send-keys -t "$_sess" Enter 2>/dev/null; }; then : else _failed=$((_failed + 1)) @@ -935,7 +944,7 @@ EOF else _q_sess=$(sh_quote "$_sess") if ssh -o BatchMode=yes -o ConnectTimeout=3 "$_host" \ - "tmux send-keys -t $_q_sess C-a C-k && tmux send-keys -t $_q_sess -l -- $_quoted_text && tmux send-keys -t $_q_sess Enter" \ + "tmux send-keys -t $_q_sess C-a C-k && tmux send-keys -t $_q_sess -l -- $_quoted_text && sleep 0.5 && tmux send-keys -t $_q_sess Enter" \ /dev/null 2>&1; then : else