Add agent logic to stop buffering greenlets and publish buffers on quit if necessary.