Codeine can be spotted in urine for up to 48 hours after the last drug dose. However, it can be detectable in chronic users for up to 1 week. It can also be detected in saliva for up to 21 hours after the last dose and in hair follicle tests for up to 10 weeks.
https://recoverypartnernetwork.com/drug/opioid/codeine-addiction