You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Prevent Chat retries and delayed Enter from submitting terminal drafts #41
Chat sends terminal input separately from the agent's recorded user message. A lost response, a permission/state transition during the paste delay, or a stalled PTY writer needs explicit handling so retries cannot paste twice or submit an uncertain draft.
A deterministic reproducer needs no account or network provider:
Start a synthetic PTY helper through the daemon and show a free composer.
Deliver a message while holding its FIFO writer; wait for the five-second write deadline.
Request another message with a new delivery key, then release the writer.
Verify the later request cannot enqueue Enter behind the expired paste. Retrying the original key must retain its interrupted result without additional input.
Another reproducer changes the helper's hook state to waiting after paste and before Enter, then back to done. Automatic Enter must still be cancelled. A deterministic terminal mutex test covers a competing raw redraw at screen-check/enqueue.
The proposed contribution adds per-run delivery keys, atomic readiness/enqueue, paste write-completion settling, interrupted-paste quarantine and full transcript matching in Chat. Manual terminal input remains available; program replacement creates a fresh automatic-delivery ledger.
This does not establish the cause of earlier intermittent native failures, guarantee native consumption, or certify authenticated fresh/resume/fork/clear/account lifecycles. Enqueue, successful PTY write and recorded UserMessage are separate observations.
Confirmed on main e306b3b: ui/chat.go:263-292 pastes, sleeps 50ms and presses Enter without re-checking the screen or state; daemon/schedule.go:286-294 does the same with pasteSettle and only checks whether the agent is gone. Retry in ui/chatview/outgoing.go:59 re-sends the whole text, so a lost response can paste twice.
The per-run delivery key, the guarded Enter, the paste-write-completion settle and the Chat-side acknowledgement all belong in the fix. The build-time copy of the MyGo module in PR #42 does not, so the mechanism there will likely change before this closes.
Activity
enowdev commentedon Nov 5, 2026
Confirmed on main e306b3b: ui/chat.go:263-292 pastes, sleeps 50ms and presses Enter without re-checking the screen or state; daemon/schedule.go:286-294 does the same with pasteSettle and only checks whether the agent is gone. Retry in ui/chatview/outgoing.go:59 re-sends the whole text, so a lost response can paste twice.
The per-run delivery key, the guarded Enter, the paste-write-completion settle and the Chat-side acknowledgement all belong in the fix. The build-time copy of the MyGo module in PR #42 does not, so the mechanism there will likely change before this closes.