Dashboard › Knowledge › PTY exit notification completion
01a07f25-9100-79b6-a015-7164c4203057Never poll PTY completion with sleep and repeated pty_read. For notifyOnExit=true, wait for the future JSON exit notification; use pty_read before exit only for explicitly needed live output, requested logs, or nonzero-exit investigation. Polling looks practical but wastes resources and races the event-driven completion contract.