Your algorithm is a third of the way through a large sell order and the liquidity on the other side disappears. What should it do?
Establish first whether the book is genuinely empty or your market data has gone stale, then stop making the problem worse: your own prints are feeding the volume measure you throttle against. The correct behaviour is to pause against a price constraint and escalate, because leaving a residual unfilled is a decision the trader owns.