I could not find any official coding guideline as to when using the history code should be stopped. I personally would only use it if it was relevant to the reason for visit, but the official guidelines state they are acceptable regardless.
From the ICD10-CM 2020 Guidelines, Chap 21, C), 4) 3rd paragraph "History codes are also acceptable on any medical record regardless of the reason for visit. A history of an illness, even if no longer present, is important information that may alter the type of treatment ordered."
In this link, it is advised on page 5, it is advised to use only if there is a clinical reason to code the former use.
So while the Official Guidelines state personal & family history codes are "acceptable", I could imagine someone spending an hour on each chart coding all the personal or family history of .... for items that are not your specialty, or have no relevance on your care for the patient. For example, my broken left ankle at age 8, or history of acne at 16, or a UTI 5 years ago, does not have any relevance whatsoever to a pulmonologist.
In your example, I would code it if the physician discussed how well they are doing with nicotine cravings, or discussed weight gain since smoking stopped, or ordered a chest xray.