How long can chlamydia go undetected?

Indefinitely. Although it can infect the cervix causing chronic cervicitis for years, can also ascend into the endometrial (uterine) cavity and out through the tubes causing severe pelvic inflammatory disease (pid) which may hospitalize you and could certainly leave you sterile. That is why it is recommended that all young women, and those at risk, be screened annually.
Forever. Chlamydia or ngu can be sub clinical or undetectable for many years. Especially on a woman.