You need to delete ENABLE_DIAGS from its USB drive to prevent rebooting to diags. You might also need to reset the bootmode var. You can do that with fastboot, or if you can get to diags SSH, you can do these commands:
rm /mnt/us/ENABLE_DIAGS
idme -d --bootmode main
reboot
|