Kim Richards made it a full month in rehab, and then bolted out of the joint in the middle of the night ... TMZ has learned, and the timing could be directly tied to her family.
Sources say Kim packed her bags, and left the Malibu facility over the weekend -- fleeing under the cover of darkness. Although she lasted more than 30 days ... we're told she'd had enough because she wasn't getting along with the staff, including the doctors.
Things had been going well for Kim in treatment. She was all smiles when immediate family members came to visit her on July 4th weekend.