I'm in your situation, being British and having been a Canadian citizen since 2007.
If 'the agent' means a US CBP officer, then it's almost certain he did not realize you were a Canadian resident, or decided that without proof of residency to apply the non-resident rules.
There is awell knowna well-known rule that going from the US to Canada (or Mexico or other nearby places) doesn't reset the clock on the 90 days you are allowed to spend in the US under VWP. However if you are resident in Canada that rule does not apply. (Otherwise someone living in Canada and visiting the US for 2 days, 91 days apart, would be in breach of the rule). USA Visa Waiver does not have a '90 days in 180' like Schengen does - it simply places a maximum of 90 days per stay. You can, at least in theory, exit the USA after 90 days and return (Although not to nearby countries, and you can't use that technique to stay in the US indefinitely.)
You should be able to enter the US. You will need to provide proof of Canadian residence - your Permanent Residence card, if you still have it, should be enough, but other things may also work. Evidence of your intent to return will be useful.
You do have an issue that you've spent a long time in the US, and the border officials may suspect you are trying to live with your girlfriend (although I think it's unlikely). Make sure you carry evidence that you have ties to Canada.
Also worth mentioning that life will become a lot easier when you have a Canadian passport. All these issues will stop being a problem, and you won't get the annoying fingerprinting, cash fees to enter, and other ways the US makes getting into their country hard.