There were. Keeping Al Qaida “out” and preventing any other terrorist groups from rising was part of the deal. Talks / negotiations between the Taliban and the US started back in 2018.
A lot of people throw the Taliban, Al Qaida and IS on the same pile mentally. But although the Taliban are no friendly bunch. They’ve been the ruling majority in the 90’s, until they made a pact with the devil: Osama Bin Laden. From what I read, they won’t make that same mistake twice. Their interest is purely domestic this time around.
It’s a sad day though, for sure.