The Manu Smriti simply says to change the thread when its damaged.
Manu Smriti 2.64. His girdle, the skin (which serves as his upper
garment), his staff, his sacrificial thread, (and) his water-pot he
must throw into water, when they have been damaged, and take others,
reciting sacred formulas.
EDIT-
Some further conditions when the sacred thread is needed to changed are given in the Hindi prayoga book called Nitya Karma Puja Prakash(Gita Press) :

VAmahaste Vyatite Tu Tath TwakthA DhArayeth Navam 1
Patitam Truthitam VApi Brahmasutram YadA Bhaveth Nutanam
DhArayedhvipraha SnAtvA Sankalpa Purvakam 2
Malamutre Twajedh Vipra Vismritaiyvopavitadhruk Upavitam Taduthsrijya
DadhyA Danyannavam TadhA 3
Meaning
If the Yajnopavita slips from shoulder and falls below the level of
left hand (1),if some of the threads are torn (2),if one
forgets to place it on ear during soucha etc (3) ,then it should
be replaced.
It further states that if an untouchable touches it then also it should be changed.

If the yajnopavita is touched by untouchables then a new upavita is to
be worn.
The Nitya Karma Puja Prakash book , more often than not , quotes from Puranas,Smritis and other Shastras and it also gives the original sources for almost all the verses/mantras given in it.
However , in this particular case,it simply cites an Achara samhita book called Acharendu , as you can see from the images posted above.
Note: You can read/get Acharendu quoted in Nitya Karma Pooja Prakash from Internet Archive