feat: prompt delivery verification via capture-pane#10
Merged
OneStepAt4time merged 1 commit intomainfrom Mar 22, 2026
Merged
Conversation
- tmux.ts: add verifyDelivery() β checks pane state + text match
- tmux.ts: add sendKeysVerified() β retry 3x with backoff
- session.ts: sendMessage() now returns { delivered, attempts }
- server.ts: POST /send returns delivery status in response
- Evidence: working state, interactive prompts, text match, or non-idle state
Fixes #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix for Issue #1 β Prompt delivery ~20% failure rate
Problem:
tmux send-keysis fire-and-forget. ~20% of prompts don't arrive because of race conditions, CC not ready, or Enter key timing.Solution: Verify β Retry
verifyDelivery(windowId, sentText)in tmux.tsAfter sending, captures the pane and checks for delivery evidence:
sendKeysVerified(windowId, text, maxAttempts=3)in tmux.ts{ delivered: boolean, attempts: number }API change:
POST /sessions/:id/sendNow returns:
{ "ok": true, "delivered": true, "attempts": 1 }Backward compatible β
ok: truestill present.Tests
prompt-delivery.test.tsCloses #1