Carter went in 1994 to NOKO to negotiate with Kim’s father, who died shortly after. NOKO was given $5B and two nuke reactors in exchange for the “promise” to abandon efforts to developed the bomb. Four years later NOKO detonated its first experimental bomb.
Carter announced on his own that he was going to North Korea after talks between the Clinton administration and Kim went south. After some discussion, his trip received the “blessing” of the Clinton administration.
As an ex President, Carter just could not STFU on international politics. He basically bungled the negotiations, boxing Clinton into a corner to accept the deal.