(This answer is analyzing the import of the agreement referred to in the question, not international law, which is another aspect)
Pretty much. About the only hard commitment the Taliban got nailed to in the (public) 2020 Doha Accords was not to allow Afghanistan to be used as a terrorist base.
- The Islamic Emirate of Afghanistan which is not recognized by the United States as a state and
is known as the Taliban will prevent any group or individual in Afghanistan from threatening
the security of the United States and its allies, and will prevent them from recruiting, training,
and fundraising and will not host them in accordance with the commitments in this agreement.
(there's more verbiage about terrorist support in the agreement, this is only the most directly relevant)
This is exactly what the US claims:
A Taliban spokesman described the US operation as a clear violation of international principles - but did not mention Zawahiri. US officials maintained that the operation had had a legal basis.
Under a peace deal struck in 2020, the Taliban agreed not to allow al-Qaeda or any other extremist group to operate in areas under their control.
However, the Taliban and al-Qaeda are long-time allies and US officials said the Taliban were aware of Zawahiri's presence in Kabul, and he lived freely and in the open in the Afghan capital.
In background briefings, US intelligence officers accused Taliban affiliates of going to the safe house after the strike to try to cover up evidence of Zawahiri's presence there.
US Secretary of State Antony Blinken said that by hosting and sheltering Zawahiri in Kabul, the Taliban had "grossly violated" the peace agreement.
al-Zawahiri being Al-Qaeda's leader hosting him seems to qualify very well for a material violation of Doha.
Was he indeed "hosted"? Or did he live incognito and unknown to the Taliban in Kabul?
It is a neighbourhood which became notorious over the past two decades for its garish multi-storey villas, mocked by Kabul residents as the stronghold of corrupt warlords and officials, a gaudy symbol of the spoils of an ugly war.
Kabulis called it Choorpur, the town of thieves. The Taliban took over some of the empty villas, close to some high-walled Western embassies, which also slammed shut when the Taliban took charge.
p.s. and in the final analysis, Doha aside, esp. with Zawahiri, the US, like Gerritt says, would have done it anyway if it felt it could get away with it. Though it usually doesn't drone friendly countries but rather cajoles them into arresting the target (Pakistan is not really a "friend" in the traditional sense).