This reminds me of the classic Star Trek (TOS) episode “The Ultimate Computer” where Kirk convinces the AI to commit suicide.