Ideally, the IP agreement with the employer is limited in scope so that the only IP assigned is that which relates to the employer’s products (e.g., a company that develops medical records software might not claim IP rights to a game the employee develops on the weekend). Unfortunately, many employers use overly-broad agreements, so it’s important to review the agreement. Even if the agreement is broad, the employer may be willing to amend it if the employee is working on something unrelated to the employer’s business and the work won’t affect the employee’s performance. Talk to an attorney in your state before you do anything that jeopardizes something of value to you, and definitely talk to an attorney before you concoct a scheme that opens you up to legal problems ;-)
Source: Attorney / software developer.