Where two or more persons form an intention in common to carry out an unlawful purpose and to assist each other therein and any one of them, in carrying out the common purpose, commits an offence, each of them who knew or ought to have known that the commission of the offence would be a probable consequence of carrying out the common purpose is a party to that offence.
Criminal Code, s. 21(2).
This is a kind of foreseeability/remoteness analysis.
It requires that, in order to be guilty of an offence that another committed while carrying out an unlawful common purpose, there was at least objective foreseeability that the charged offence was a probable consequence of carrying out the common purpose. E.g. a jury could find that a person ought to have known that assault was a probable consequence of carrying out a robbery.
This must be more than just possible; it needs to be probable. But this does not necessarily mean more probable than not.1
And in the case where the offence is murder or attempted murder, the inquiry changes from an objective test (what someone ought to have foreseen to be a probable consequence) to a subjective test (what the accused actually foresaw to be a probable consequence).
This is treated as a question of fact, to be determined by the trier of fact (e.g. the jury, if there is one).
Some language from courts
The English cases in their examination of the scope of the common purpose are of some assistance in scrutinizing the relationship between the common purpose and the consequential offence. A consequence, if remote enough from the common intention, may not be reasonably foreseeable. The greater distance the ultimate offence is from the common intention, the less likely it can be termed a probable consequence.
(R v. Kawal, 2018 ONSC 4560 at para 59).
There may, of course, be situations where the level of physical violence contemplated is so minimal that serious bodily harm is merely a possibility rather than a probability. And it may indeed be the case that this observation would hold true even in some situations where the unlawful purpose is an assault of a sexual nature. While I personally would not have thought that what occurred in this case is one of those instances, the question whether the causing of bodily harm short of death was a probable consequence of the sexual offence committed against Elizabeth Johnson was for the jury to decide.
(R. v. Kirkness, [1990] 3 S.C.R. 74 at 113, in dissent, but there was no disagreement on this point, and cited in R. v. Jackson (1991), 68 C.C.C. (3d) 385 at 423 (Ont. C.A.), Doherty J.A., for the Court of Appeal; affirmed on appeal to S.C.C.)
1. I do see this hasn't been absolutely resolved in Canadian jurisprudence. See for example the language the R. v. Kirkness dissent, adopted by the Court of Appeal for Ontario, which implies to remove a consequence from the range of probable consequences, its likelihood should be "so minimal that [it] is merely a possibility." On the other side, there is also a reference to a criminal law treatise in R. v. Kawal that does suggest the "more likely than not" interpretation—this was not clearly adopted by the trial judge in that case but has been followed by three other trial judgments since. No court of appeal has confirmed this position.