You can't just un-invent nukes. They're there, they provide nuclear deterrence. They will continue to exist no matter how many countries "agree" to stop using them. Regardless of whether you have them, there is always a chance that someone might still keep the nukes in secret despite what they agreed to. No one would want such a risk if they have an option to avoid it.