2 Commits

Author SHA1 Message Date
can1357 43666b3b1a fix(cli): follow promise resolver convention 2026-08-05 01:11:59 +02:00
roboomp 03d90bdd9f fix(cli): flush final json record before print-mode exit
Per-event stdout writes in --mode json (and text) were fire-and-forget
and relied on an empty-write flush barrier before dispose/exit. The
barrier awaited its own callback, not the preceding large write, so a
big final agent_end could be truncated when the process exited before
the pipe drained -- while still exiting 0.

Serialize every print-mode stdout write on its own completion callback
(honoring backpressure) and block shutdown on the tail so the terminal
record is delivered in full.

Fixes #7635
2026-08-04 16:21:29 +00:00