The man behind the idea of a submarine aircraft-carrier was Admiral Yamamoto. In 1942, Yamamoto envisioned an underwater craft capable of launching attack bombers against U.S. Coastal cities. His original plan called for 18 such submarines, but after his death in April of 1943, the project was deprioratized. Construction plans were scaled back, due to the prevalent steel shortages, and eventually only two were built and entered service.
In 1944, the two submarine carries were organized into a flotilla consisting of I-400, I-401 and two AM-class submarines, which were smaller and carried only two Seiran bombers. The flotilla's total bomber force was 10.
In March 1945, Vice Adm. Ozawa considered a plan to use the flotilla to unleash biological weapons on the U.S. West Coast in revenge for the firebombing of Tokyo. But the idea was shelved for fear of U.S. Response. Instead, a plan to destroy the Panama Canal was given a go ahead.
Then on 6 August, Hiroshima was attacked.
POD: The Panama Canal strike was shelved and Ozawa's plan was given new life. As they waver because of the implications of attacking the US in this way, 9 August sees another attack, this time on Nagasaki.
EDIT based on criticisms:
The Japanese respond to the US attacks on their cities with a gamble--they threaten to send their submarine aircraft carriers to attack West Coast of the US with biological weapons. The Japanese make this threat through the Spanish embassy and it is kept a secret from the public by the administration because it is feared that it would spark panic and chaos on the West Coast.
The idea of submarine carriers is at first unbelievable to the administration and so Truman dismisses the threat as Japanese despair. But because no more bombs are available, the US is reduced to conventional bombing of Japan.
There is also the question of the naval blockade. US Admirals tell Truman that the Japanese won't get through.
Meanwhile, the Japanese continue preparations and the flotilla sails. But then the Emperor declares a surrender and orders all units to stand down.
But one of the Captains refuses to obey orders and sails on. Hours pass before the Japanese learn that one of the subs has not surrendered. They promptly notify the US about this.