The cam angle sensor (CAS) at the back of the cylinder head is the classic NA/NB double-trouble part: its O-ring is the single most common Miata oil leak, and the sensor itself, or its wiring, causes intermittent no-starts and hot-restart failures. It is a distributor-shaped unit plugged into the rear of the intake cam.
The CAS reads engine position for spark and injection. If the ECU loses that signal, it will not fire the coils, so you get a crank with no spark.
- Oil down the back of the block, worst near the firewall is the hardened CAS O-ring. Replace the O-ring (and inspect the sensor's mating surface) rather than chasing it as a valve-cover or rear-main leak. This is the number-one oil leak on these cars.
- Cranks but no spark, especially when hot, then starts again once cooled is the classic heat-soaked CAS on NB1 cars. Back-probe the sensor for signal while cranking; no signal with good power and ground condemns the sensor.
- Random stalling or a tach that drops to zero while running points at the CAS signal or a chafed CAS harness.
When you have the CAS out for the O-ring, note its clocking. On the earlier CAS it drives off the cam and its rotational position sets base timing, so mark it and return it to the same spot, or you will have to re-time it. Use a fresh O-ring lightly oiled, not silicone sealant.