You confuse two different things.
1. Agreeing to negotiate a contract (deal)
2. Agreeing to the terms of the contract (deal)
Most people do a "simple" yes promise to the employer which means that they will come to the office and do the work. Most corporations require a very strict contract which involves much more than just you doing that you promised.
1. First, when he asked you to stay permanently, did he present all the details of the contract?! No. So it is impossible for you to agree to something which you were unaware of.
2. Which brings us to the HR step in which they can present the contract of any form or shape. If you negotiate the terms of the contract, and negotiations break down you are not at fault. It is very common to take advantage of employees who managed "to make a promise" and impose tougher terms. Don't feel guilty! Guilt is the ultimate weapon here. You agreed (in broad terms), BUT NOT TO THIS SPECIFICALLY.
Corporations do this a lot. This IP thing is not new. Essentially they own what you create inside the company. This is a good thing if they have a team of brilliant people already there and company culture, it can mean you learn a whole lot from them and in exchange your ideas are molded by the group. (Apple comes to mind)
However if you are going to a company because you have ideas and you already have germinating IP inside your head, well it's a very bad idea to give this IP to them. Most of the time you'll create and develop ideas alone, especially in software, and then the company owns them. You should do this if they give you tremendous perks, and long term company stock and so forth. They will still "make a huge profit" out of your ideas but you have to make sure you take your cut. You need a professional to write this up and negotiate for you.
The conclusion is this:
Contracts are made between honest people.
Never sign a contract with someone you don't trust, no matter how good it sounds and how many people tell you it's iron clad.
Dishonest people will take the time to create the circumstance to f*ck you up. The contract is just there to tell them what not to do. If they have the time and resources they will pursue all the other means, believe me, there are many.
Also you have to realize that the contract can contain only foreseeable circumstances. Last time I checked, things nobody thinks about, do happen.