Went through this last year when I was thinking about spinning my side project into a real company. Spent two weeks going through my employment agreement with a lawyer and what I found was more nuanced than the usual "anything you build on company time is theirs" advice.
Most tech employment contracts have one of two models:
Assignment scope model: They claim ownership of anything that (a) relates to the company's current or reasonably anticipated business, or (b) was developed using company resources (laptops, networks, time). Some contracts say "any" business, which is absurdly broad.
California model (and a handful of other states): California Labor Code 2870 says they CANNOT claim work you do on your own time, with your own equipment, that doesn't relate to their business. But you have to prove all three. The "relates to their business" part is vague and companies stretch it.
What actually matters in practice: "Company resources" includes your work laptop. Build on a personal machine, period. If your employer is a SaaS company and you're building a SaaS tool, you have a problem regardless of state. Some contracts have an "outside activities" disclosure clause. Filing one proactively protects you way more than staying quiet. The "reasonably anticipated business" language is where companies get creative during disputes. Courts have ruled both ways.
I ended up filing an outside activities disclosure and getting written sign-off before I did anything public. Took one email and two weeks to hear back. Awkward but worth it.
If you're outside California: read your specific contract, not Reddit summaries. The "just build it in secret" advice is genuinely risky if the project ever becomes something they want.
One practical thing: many contracts have IP carveout forms you can file voluntarily to establish that a specific project pre-dates your employment or falls outside the scope. Use them.