mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-09-30 12:39:42 +02:00
The first shape of the Enter loop read the composer BETWEEN two short waits, and tested `wait.ended` (the session exiting) where it meant `timedOut`. A `stop` that fired while no wait was open was lost, since signals have no history, and a re-wait that had already resolved on `stop` fell through into another wait that could never see the edge again: measured twice, the answer was on screen and sendwait ran its whole 580 s slice anyway. The long re-wait (a tagged duplicate of the original frame) is now registered first and kept open in the background for the rest of the call; the loop reads the composer and re-sends Enter beside it, stops when the prompt has left or the wait's response has landed, then returns that response. Measured: the stranded prompt got one extra Enter and sendwait returned on `stop` at 36 s. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>