The surrender of Japan brought hostilities in World War 2 to a close. By the end of July 1945, the Imperial Japanese Navy had effectively no capacity to conduct operations, and an Allied Invasion of Japan, likely spearheaded by the Soviets was imminent.
While publicly stating their intent to fight on to the bitter end, Japan's leaders at the Supreme Council for the Direction of the War, were making entreaties to the still neutral Soviet Union, which was obliged to participate in the invasion of Japan through their alliance with the anti fascist powers, to mediate peace on terms as favorable to the Japanese as possible, but in no uncertain terms this would be a surrender, and likely on the very same practical terms as were imposed after the unconditional surrender.
In fact there was of a suspended coup against the military junta controlling Japan, which would have been enacted if terms were not reached. The American political and military leadership was well aware of this, as it was transmitted to them through the their intelligence services and the Soviets. And there was a a bitter debate about the use of nuclear weapons, the side in favour of using eventually prevailing with Truman. Those are simply the facts.
This is completely different than what you initially said.
However the only coup was an attempted coup on the night before Japan surrendered.