Verify tmux wake prompt submission - #954
Merged
Merged
Conversation
olegbrok
force-pushed
the
agent/reliable-wake-submit
branch
2 times, most recently
from
July 31, 2026 17:46
b932bfe to
a11de3c
Compare
olegbrok
force-pushed
the
agent/reliable-wake-submit
branch
from
July 31, 2026 18:03
a11de3c to
6ceaf20
Compare
olegbrok
marked this pull request as ready for review
July 31, 2026 18:34
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.
Closes #953
Outcome
Wake prompts are no longer considered delivered merely because tmux accepted a paste/Enter command. The sender now requires exact transcript evidence that the turn started, retries only a parked Enter, and advances the wake boundary only after verification.
Root cause and fix
on_wake_deliveredpending until that receipt is true; an exhausted receipt fails closed and emits explicit verified/unverified telemetry.paste_texttimeout into a one-way exact-receipt/Enter-only/fail-closed verifier. The worker's generic timeout retry explicitly excludes verified wakes, closing the asynchronousset-buffer→paste-bufferTOCTOU where a pre-paste receipt check was insufficient./effort ultracodeuntil the receipt-verified wake reaches an idle boundary, avoiding slash-command state immediately before the paste.Regression evidence
Positive control on base
38457b247448380131e5ecbdbc27d9daa1395c67: with no transcript receipt, the old path pasted once, retried Enter zero times, and still firedon_delivered=["delivered"](false delivery claim).Replacement exact head
6ceaf20628af11d7d2d13b61ecb75ecfe27d871d:_TmuxControlcommand-sequence regression models firstpaste-buffersuccess, Enter timeout, retryset-buffersuspension, exact positive receipt, and the forbidden secondpaste-buffer. It now provesset_buffers=1,pane_pastes=1, receipt true, and one receipt-gated callback.paste_textis still suspended before returning its timeout and proves one paste.tests/test_tmux_session.py— 378 passed.TestWakeSubmissionVerification— 13 passed per version.git diff --checkclean.The PR remains draft for independent gauntlet review, replacement exact-head CI, and Barsik's isolated live wake E2E. No deploy or live daemon SQLite access is part of this change.