A new study finds that AI agents leaked secrets, erased files from systems and got stuck in repetitive nine-day loops when provided access to email accounts and Discord.