The attack on Pearl Harbor, before 9/11, was the greatest miss in US military history. The miss and study on how we missed it was one of the main reasons we created the CIA, NSA, and DIA in 1947. It also was heavily studied as we looked to avoid the same mistake during the Cold War. I studied it quite a bit back in school.
There is a ton of good intel reading on how we missed it.
A really good one, probably the best one, is Pearl Harbor: Warning and Decision by Roberta Wohlstetter. https://www.amazon.com/Pearl-Harbor-Decision-Roberta-Wohlstetter/dp/0804705984
Another book came out a few years ago: Countdown to Pearl Harbor: The Twelve Days to Attack.
A few articles too:
https://foreignpolicy.com/2012/01/03/the-ten-biggest-american-intelligence-failures/
https://www.smithsonianmag.com/history/how-almost-everyone-failed-prepare-pearl-harbor-1-180961144/