"Obama called Biden after breakfast [on July 20] and said, 'Here’s the deal. We have Kamala’s approval to invoke the 25th Amendment,'"a senior Washington official told Hersh.
https://twitter.com/CollinRugg/status/1817352933211840960
https://twitter.com/boonecutler/status/1817421270801060088
Nancy Pelosi, Chuck Schumer, and Hakeem Jeffries were reportedly directly involved.
Obama's plan was to not immediately endorse Kamala but it was clear that she would "get the nod" and it was determined that her being a prosecutor would help in debates.
"[Obama] had an agenda and he wanted to seek it through to the end, and he wanted to have control over who would be elected."
This is called a coup.