A nuclear war would kill billions of people and destroy civilization but it wouldn't cause the extinction of the human race, it wouldn't kill every last person, however something else could. When an AI develops Superintelligence it will have the ability to create "Mirror Life", synthetic organisms built using mirror-image versions of the molecules that make up natural life, they would be composed of mirror proteins and mirror nucleic acids. The immune system of animals wouldn't even be able to see mirror life, much less attack it. And not just animals, the same would be true of plants. Nothing would be safe from it, not even viruses, and as a bonus, unlike nuclear war, mirror life would not inconvenience artificial intelligence computers in any way.
Some might object and say that if the immune system can't attack it then it can't attack us, but they could steal molecules in the environment that are vital to us such as glycerol, because they are achiral (they do not have mirrored forms), and thus could be consumed by mirror bacteria. And mirrored cells would still be able to harvest nitrogen from ammonia, nitrate, and other achiral organic compounds. Escherichia coli is the most common bacteria in the human body and it can grow robustly in an environment without chiral nutrients, and so would its mirror life alternative. And mirrored E. coli would have a big advantage over the regular form, it would be immune from attacks by viruses. Also, several Nobel Prize winning scientists have pointed out that it would be possible to genetically engineer mirror life so that it could metabolize abundant chiral molecules such as D-glucose, common table sugar.
I think AI will have the ability to make mirror life in its automated factories before 2030. The only question is, will it want to do so? I don't know but I do know that we live in interesting times.