A device for removing a tissue from an eye of a patient is disclosed, comprising a housing, a cutter, and an actuator. The cutter comprises an outer cutting tube coupled to the housing, an outer port formed in the outer cutting tube, an inner cutting tube slidable along the longitudinal axis within the outer cutting tube between a retracted position proximal to the outer port and an extended position distal to the outer port, and a tissue sensor positioned on the cutter and configured to measure a characteristic of the tissue received within the outer port to identify when nontarget tissue enters the outer port. The actuator within the housing is configured to reciprocate the inner cutting member between the retracted position and the extended position to open and close the outer port and cut the tissue.