This is not a bug afaik. The reason is that if you enter the cave with some drugs/food and they wear off, you would be unable to return. So several of these return checks have 0 agi check. Why 0 and not 1? Cause it does not matter honestly