North Korea keeps issuing threats against the US and they seem dead serious to try to prove that they are totally capable of attacking the US -or or allies- in an intelligent way.
The sad fact is that a losing war of aggression may be one of the few viable ways for North Korea to get out of the economic disaster they have gotten themselves into.
From many perspectives, North Korea is many decades behind the rest of its neighbors -and world- but the reality remains that they have a massive military force. Not necessarily effective, but massive. Anything massive attracts resources from other domains and North Korea has deliberately pursued a policy of 'military first'. So, almost everything not military related has been left without many resources.
Another -somehow less viable- way for North Korea to change its course is to completely alter the political discourse as well as its economic policies, but, after so many decades of indoctrination, its population would be left totally confused and disoriented.
North Korea is in a very hard situation and if we want to avoid an aggression war initiated by them we need to engage them in the same ways that we have started to engage China in the 1970s. However, for that to happen North Korea needs to take the first steps and show us that they want to follow into Chinese footsteps.
Based on what they are doing now, North Korea is doomed to remain one of the world's pariah for quite some time. I feel awful for its citizens though.