(but there were rogue elements in the military who were planning a coup if that happened to prevent a surrender.)
I think Tojo was the main culprit.
Because of Tojo's perceived culpability for the fall of Saipan, he was forced to resign on July 18, 1944 - more than a year before Hiroshima and Nagasaki.
A further reason for dismissing him was that the higher-ups in Japan saw him as an obstacle to negotiating peace with the Americans.
In other words: By the time of the atomic bombings, Tojo had been removed from power, had no influence, and was no longer a factor.
Regards,