Delicious denial
The sanctions were the stalemate breaker. Nuclear war could be fought between both the United States and North korea at any time, but only the United States has the ability to apply sanctions to north korea. Its like trying to invade a castle. Obviously its going to take a long time, but if you block any incoming imports/exports then everyone inside will starve. Eventually they'll have no choice but to yield
The threat of nuclear war was stopping both countries from attacking each other obviously, but the sanctions basically ended hostility. Therefore the sanctions were the primary cause of NK's withdrawal