I started Sentry before Disqus, and even if it wasnt disclosed as prior invention (PIIA might be something youve seen), I had the support of the founders to continue to develop on open source. I think you've just gotta find companies that recognize the value things create.
I will say I drew a line personally: I only ever worked on projects that helped Disqus during working hours, so if I wanted to just build fun unrelated features (even on Sentry) I did it in my evenings/weekends. Sometimes that did mean contributing to Sentry, but it was to fix things that specifically helped Disqus (such as overloading the production services when we had an outage).
Wondering how come Disqus allowed this to spin off into another company? Could they not claim that the code add belonged to them? Was it that everything was open source licensed that they could not claim rights, or were they just nice people?