From CALPERS:
If you leave your contributions, you may apply for a retirement benefit as soon as you meet the minimum retirement eligibility requirements. You may leave your contributions on deposit until the year you reach age 70 ½ — when you must receive a refund or a retirement benefit under federal required minimum distribution regulations, unless you're working with a reciprocal agency. Every October, CalPERS sends letters and election forms to all members approaching age 70 ½ notifying them that they must either refund or retire when they attain age 70 ½ or, if they are age 70 ½ this year and not currently working for a reciprocal agency, to contact us to request a Required Minimum Distribution packet. A refund will include your contributions plus interest. Employer contributions are not refundable. Taking a refund ends your CalPERS membership. This means you lose the right to receive a service or disability retirement benefit. Since this can impact your future retirement income, carefully consider your decision to refund.