When negotiations went into place between AC and AA, AC must have decided to sweeten the deal by allowing codesharing between CP and AA knowing full well that it (AC) has every intention of splitting CP from T3 so that it can consolidate 'all' of its operations in T1 and T2. You can already see the writing on the wall that AA will not be happy about the codeshare in Toronto, at least, and may eventually just pull out when passengers have to know which flight is leaving from which terminal.
You know who is to blame.