Your dog is resting, then suddenly snaps at the air as though an insect flew past. It happens again when no insect is visible. Do not try to correct the behavior or assume your dog is playing. Repeated "fly-biting" episodes can have medical causes, including focal seizures, other problems need to be ruled out too.
Contact your veterinarian and describe when the episodes occur, how long they last, and whether your dog responds to their name. If it is safe, record a short video for the appointment. Note any changes in eating, behavior, medication, or awareness. If your dog has a prolonged episode, collapses, has repeated seizures, or is injured, seek urgent veterinary advice. Keep them away from stairs or sharp objects during an episode without putting your hands near their mouth.
Why a video helps
An episode may not happen in the exam room. A clear recording can show the exact movement and what happens before and after it. Your veterinarian can decide whether further tests or a specialist referral are appropriate. You cannot confirm a seizure from a description alone, and a dog responding to a distraction does not rule one out.
While waiting for the appointment, keep ordinary routines calm and avoid turning each episode into a training session. If your dog is snapping at a real insect, reflection, or light, that context matters too, tell the veterinarian what you observed rather than choosing a diagnosis yourself.
The right first step here is medical assessment. Training can wait until you know what you are treating.
Sources: VCA Animal Hospitals: Focal Seizures and Fly-Biting in Dogs. VCA Animal Hospitals: Compulsive Disorders in Dogs.