Replace fixed sleep(3) + paste-buffer race with a wait_for_claude_ready() function that polls the tmux pane for the ❯ prompt (up to 120s). This fixes the bug where the initial prompt was pasted before Claude Code finished initializing, resulting in a stuck session with an empty prompt. Observed on issue #81: session sat idle for 42+ minutes because the paste arrived during Claude's startup splash screen. Changes: - Add wait_for_claude_ready() that polls tmux capture-pane for ❯ - Call it inside inject_into_session() before every paste - Use inject_into_session() for initial prompt (was inline paste-buffer) - Remove fixed sleep(3) from session creation and recovery paths - Fail hard if claude doesn't become ready within timeout Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| dev-agent.sh | ||
| dev-poll.sh | ||
| phase-test.sh | ||