If the company and employee are still friendly you can work this out even in California.
I know of one case where an executive wanted to leave a large public company in a highly competitive market. Part of the agreement was that they would be continue to remain as a non-working employee including being fully paid for the following year (including all bonuses and benefits - no less than what they got in the prior year) if they didn't go to a competitor.
Since this meant that going to a non-competitor mean drawing two salaries, there was a mutual built-in incentive to work for a non-competitor.
Had they gone to a competitor they would have been no worse off than if they'd not signed the agreement.