Once cooked the cooked chicken can safely last in the refrigerator for up to 4 days and after 4 days in the refrigerator the chicken should be thrown out.
If you want to keep the cooked chicken longer than 4 days then you should freeze it instead and when cooked chicken is frozen it can last for 6 to 8 months before going bad.