What I find unclearly defined in the rules is how long the benefit to reach lasts when using a weapon with reach.
Consider again the text:
Reach. This weapon adds 5 feet to your reach when you attack with it.
Clearly we cannot believe that every time you swing a whip your reach increases, first to 10, then to 15, then to 20 and so on. This is obviously not the intended interpretation.
So, how long does the benefit to reach last? Your attack? Your turn? The entire round? Until your next turn? This much seems to be unclear when working strictly within RAW.
An overly-restrictive interpretation would be that when your opponent triggers the opportunity attack, you are not currently attacking with any weapon at all. In that case, your reach is 5 feet. If you take this interpretation, then opportunity the opportunity attack only occurs if the opponent moves out of your 5 foot reach.
How we interpret the RAW verbiage in our campaign:
An alternative interpretation that I consider worth some merit requires an imaginative interpretation of "when you attack." It is this: whichever weapon you use for the attack action should also be the weapon with which you make opportunity attacks.
Using this interpretation, even if fighting two-handed, it is unambiguous which weapon is used to perform opportunity attacks, and therefore unambiguous what your reach is for opportunity attacks. If two weapon fighting, you would use the same weapon used for your primary attack action, not the weapon used for your bonus action. In the whip/dagger combination, which is not compatible with two weapon fighting, you would use the weapon most recently used to attack.
Specifically addressing the whip/dagger situation, it is already understood that because a whip is not light, a character cannot use a bonus action to enable attacking with both weapons in a round. While not explicitly stated in RAW, I consider it a reasonable extension that a reaction also does not enable attacking with the second weapon.