Biden didn't discuss anything with anybody. He just abruptly withdrew American troops.
That is not true. Picking up where Trump left off (Trump was all for getting out of Afghanistan), Biden said the May 1st deadline Trump set was not feasible so he made September 11th the new deadline (I guess for some horrid, symbolic, theatrical reason). As the Taliban started moving, Biden changed the date to August 31 for the safety of American troops. Biden's intentions were not secret.
By the way, I have thought for a while that the US needed to leave Afghanistan as it didn't seem like we were making much real progress in the region. The US should have left 19 years ago. All the US did was spend a bunch of money (enriching the corrupt in the process) for absolutely nothing.