I can imagine a scenario where the Japanese changed their codes and the Americans are intelligence blind for a couple of weeks late may Early June, so the Carriers are back at Pearl when the Japanese strike. ...
The IJN did change the JN25 code in March. This was the code used by the fleet & subordinate HQ. The tactical radio code was different (Altogether some 28 different codes or encryption systems were identified as used by the Japanese military during the war, including the diplomatic codes.)
The change in March was routine, both in that the IJN changed the keys for that code every 3-4 months, and preferred to change it during the run up for a new set of operations. This shut the USN intelligence out of the IJN HQ radio traffic for weeks. The breakthrough was aided by the Tokyo raid. When Dolittles bombers appeared over Tokyo the Japanese home fleet went crazy and set to sea like mice flushed out of barn feed bin. The radio traffic was at the maximum the operators could transmit, and because of the pressure sloppy and full of the sort of errors that code breakers love. within a few days the US code breakers had enough clues they found the keys and were back inside the JN25. Take away the Dolittle raid and it could have been weeks, perhaps months before the USN intelligence staffs were regularly reading the messages again.
... so the Carriers are back at Pearl when the Japanese strike. ...
Nimitz is caught with his pants down, He does a emergency sortie of the fleet, but not knowing the situation he is cautious. The fleet reconnoiters and probes from a distance. Midway is less well defended and the Japanese have the leisure to try a landing operation. Suceed or fail its a very bloody operation for the landing force. Odds are Yamamotos fleet fails to pin & destroy Fletchers small fleet. If they stray to floe to Hawaii they are harassed by the 500+ aircraft based there. Eventually Yamamoto returns to home base declaring victory after losing the better part of the landing force, and a ship or two from US airpower and a lucky submarine shot. The fleet has burned a immense amount of fuel for several weeks, and maybe gained a island it cant well support.