Responses
I think the agreement was made after toji's death by gojo himself because when Toji made the deal to sell megumi to the ze'nin's he didn't know gojo and and when he told gojo about megumi he was already dying so I think someone else changed the agreement which was gojo probably

So was the agreement that Toji made meant to protect megumi? Like in the agreement if gojo were to die that means no one could protect him so the clan would protect him if it were to ever come to that?