In Xanathar's Guide to Everything, the spell Chaos Bolt includes the following:
If you roll the same number on both d8s, the chaotic energy leaps from the target to a different creature of your choice within 30 feet of it. Make a new attack roll against the new target, and make a new damage roll, which could cause the chaotic energy to leap again.
Ordinarily, the spell has you roll 2d8s and xd6s (upcasting just adds d6s) so the wording in the above quote makes sense, since there are only ever 2d8s.
Unless you crit. Then there are 4d8s.
So how would you resolve whether or not to have the chaos bolt target a different creature for when "both" d8s match? Is it if all 4 match? Is it if only 2 of them match out of the 4 (in which case, I assume nothing special happens if you do get the same value 4 times)? The wording of "both" makes this ambiguous...
If the latter of my above suggestions, I assume a critical hit would therefore also increase the likelihood that the chaos bolt will target another creature compared to a non-critical hit?