I don't think it's agreement, "dicho" is to refer to the "pacto", for example when you start to talk about someone or something, and after in the text you want to mentioned it again, and you just add "dicho" for refer the principal object that you are talking about.
For example:
Hoy observe un "arbol" muy grande en el camino, el cual me encanto, "dicho arbol" tenia muchas aves en sus ramas.
*Hope help you (and sorry for my grammar errors)
Greeting!