[BUGFIX] Ensure we process AGI responses and send a ref before processing any complete events