Problem
tmux send-keys is fire-and-forget. ~20% of prompts don't arrive because:
- Enter key race condition (500ms delay helps but doesn't guarantee)
- CC might be in a state that doesn't accept input (permission prompt, thinking)
- No way to verify the prompt actually appeared in CC's input
Expected Behavior
After sending a prompt via send-keys, Aegis should verify delivery by:
capture-pane after a short delay
- Check if the sent text appears in the pane output
- Retry if not found (up to 3 attempts with increasing delay)
- Return delivery status in the API response
Files to modify
src/tmux.ts — add verifyDelivery() method
src/session.ts — use verification in sendMessage()
src/server.ts — return delivery status in POST /send response
Acceptance Criteria
Problem
tmux
send-keysis fire-and-forget. ~20% of prompts don't arrive because:Expected Behavior
After sending a prompt via
send-keys, Aegis should verify delivery by:capture-paneafter a short delayFiles to modify
src/tmux.ts— addverifyDelivery()methodsrc/session.ts— use verification insendMessage()src/server.ts— return delivery status in POST /send responseAcceptance Criteria
{ delivered: true/false }