Why not draft up something to give to the company disclaiming all rights to your work? If lawyers are too expensive for the company, I'm sure they'll sign it right away! I'm guessing the HR person is just incompetent and the issue should be escalated.
What exactly does a company think is going to be the outcome of saying "Oh, BTW, we might sue you for this, we might not and we're not going to give you a straight answer one way or the other" to one of their employees?
In a lot (most?) companies, the issue would be escalated all the way to the top with the same results. There's no incentive for them to take action once you've signed their contract. As other's have mentioned in this thread, you should have demanded an exclusion cause before signing.
This 100%. I've crossed out sections like this without issue before. A contract is a negotiation, not a rubber stamp.
Some companies these days will allow you to list things which you work on (open source, second job, etc) which you can have excluded. This works fine for me as well.
I suspect that in the long run common contracts like that will become invalidated and a legal quagmire.
I have seen several contracts wanting to claim ownership over everything I write. I don't sign them, but it seems most people do and often do so at multiple contracting firms and employers. There are companies that should be having arguments with each over who own what contractors code.
Clearly this is not a reasonable situation and clearly it is unreasonable to try to screw a developer out of everything he owns and clearly it is hard to get a job without signing something like this. The runs afoul of anti-competition laws and basic decency. I am sure it will stand in some shitty jurisdictions and completely fail in others, but many already have some kind of work for pay law that transfers IP to the people paying for it by default and that seems pretty reasonable.
What exactly does a company think is going to be the outcome of saying "Oh, BTW, we might sue you for this, we might not and we're not going to give you a straight answer one way or the other" to one of their employees?