There's a couple things at play here I think.
1. You did some welding that you haven't done for awhile, possibly since you used to smoke? That would for sure bring on those cravings.
2. You just reached your 3 month smoke free milestone and I have often heard people say ... "Beware the 3's"! 3 Days, 3 Weeks & 3 Months. Weird shit tends to happen at these points.
3 months and you're no longer a new quitter but you're not completely there yet as a non-smoker; still some work to do. Because you no longer have daily challenges you may tend to let down your mental guard a bit. Use this experience to remind yourself to be on guard always for those sneaky, out of nowhere assaults by the nicodemon. You done good today by realizing what was actually happening! You stood tall and refused to be seduced back to having a smoke. Keep this experience in mind for future when you get bush-whacked out of nowhere and you'll be fine!