The half-life of codeine is relatively short, but its metabolites do tend to stay in your system for much longer. Codeine is detectable through a urine test for up to 2 to 3 days, a blood test for up to 24 hours, and a saliva test for up to 1 to 4 days.
https://recoverypartnernetwork.com/drug/opioid/how-long-do-opioids-stay-in-your-system