In an infusion pump operable to deliver fluid to a patient at a programmed therapy flow rate, air-in-line sensing is improved by commanding the pumping mechanism to deliver a bolus volume of fluid at a flow rate higher than the therapy flow rate when an uninterrupted volume of air is detected that exceeds a first threshold. In many cases, the bolus will be effective to clear microbubbles from an observation zone of the air-in-line sensor to avoid an air-in-line alarm condition. If the uninterrupted volume of air continues to grow beyond a second threshold in spite of the bolus, then an alarm may be triggered. The invention reduces false alarms.