You need to head up at or before you hit your bailout limits. Difference between oc is that you don’t need to carry additional reserves to share deco gas. For instance, it’s not uncommon to carry 1.5x the required deco gas on oc. If a bottle fails, you share with your buddy and do 1.5x the time. With a rebreather, you only need 1x the deco gas. Losing a breather puts you on oc. Losing that bottle puts you on your buddy’s bottle while he’s on the breather. You’re covered.
So if you’re carrying 2hrs of deco gas, you need to be ascending at or before you have 2hrs of deco ahead of you.
your bailout gas is almost always one of the main limiting factors. The scrubber on many units will last longer than most people want to be in the water on one dive.