ttyd drops the reply of fast one-shot commands (spurious "no response") #35

Closed
opened 2026-10-08 00:31:59 -04:00 by jared · 0 comments
Owner

Found while testing v0.6.0, 2026-10-08.

devdesk attach --new|--rename|--end over ttyd lost its {"ok":true} reply about half the time (24-call probe: rename 6/6 lost, new 3/6, end 4/6). The action itself always happened. ttyd 1.7.7 sees the child exit and closes the WebSocket (often with close code 1006) before it has read the pty's last output.

Effect: the UI reported "no response" for renames, ends and creates that had in fact worked, and --existing/attach errors could vanish before the "reason is shown in the terminal" message appeared.

Fix: under ttyd (DEVDESK_VIA_TTYD=1, set by devdesk-serve), one-shot replies and dd_die wait up to DEVDESK_LINGER (1 s) for the browser to hang up; the client hangs up as soon as it has a complete reply. After the fix: 24/24 replies delivered, errors included.

_Found while testing v0.6.0, 2026-10-08._ `devdesk attach --new|--rename|--end` over ttyd lost its `{"ok":true}` reply about half the time (24-call probe: rename 6/6 lost, new 3/6, end 4/6). The action itself always happened. ttyd 1.7.7 sees the child exit and closes the WebSocket (often with close code 1006) before it has read the pty's last output. **Effect:** the UI reported "no response" for renames, ends and creates that had in fact worked, and `--existing`/attach errors could vanish before the "reason is shown in the terminal" message appeared. **Fix:** under ttyd (`DEVDESK_VIA_TTYD=1`, set by devdesk-serve), one-shot replies and `dd_die` wait up to `DEVDESK_LINGER` (1 s) for the browser to hang up; the client hangs up as soon as it has a complete reply. After the fix: 24/24 replies delivered, errors included.
jared added this to the v0.6.0 light mode + house UI milestone 2026-10-08 00:31:59 -04:00
jared added the bug label 2026-10-08 00:31:59 -04:00
jared closed this issue 2026-10-08 00:32:26 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/devdesk#35