I think a running agent periodically checks if a process it started has finished.

[deleted]