cli: reject forward output gaps during attach

Overlap trimming advanced the attach cursor across missing PTY bytes. Reject forward gaps before writing output and let the existing error path restore terminal mode. Cover lost, contiguous and overlapping delivery through the real CLI in a controlling terminal.
b55205fe22Lucenx9 committed on 10/14/2026, 3:04:31 PMparent1122658

Checks

All checks passed
11 files changedLine totals unavailable