The entire geopolitical situation is like a big game of pick up sticks.  And North Korea knows this.

The United States can't do anything to North Korea without pulling China into a confrontation.

China won't do anything because, as long as North Korea is acting like a loose cannon, it keeps the United States on its toes.

North Korea won't do anything because it can't afford a war.  And a nuclear first strike is out of the question because the United States has enough nuclear ordinance of its own to turn North Korea into a glowing wasteland.

A nuclear exchange might also pull Russia and its nuclear arsenal into the fray too.