disinto/dev
openhands 515c528e10 fix: poll for claude readiness before injecting prompt into tmux
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>
2026-03-17 23:23:12 +01:00
..
dev-agent.sh fix: poll for claude readiness before injecting prompt into tmux 2026-03-17 23:23:12 +01:00
dev-poll.sh fix: address review findings from issue #67 escalation refactor 2026-03-17 18:30:57 +00:00
phase-test.sh fix: address review findings from issue #79 phase protocol 2026-03-17 19:27:11 +00:00