I've been solving exercices in a book called practice makes perfect (linked down below) And in the Plus-que parfait exercices (page 82,81. 10.2 Exercice. N.3, N.10) there are those two sentences which are really confusing me :
Tu (se demander) ....... s'il était allergique. Elles (s'écrire) ..... pendant des années.
The answers ,according to the Answer Key, should be (t'etais demandé(e), s'étaient écrites) but I don't understand why there is an agreement here. I thought that reciprocal verbs which take an indirect object its past participle does not agree with the subject. And worth noting also that in the exercices of the Passe Composé there are those two similar sentence which have no agreement (page 63) :
Ils se sont écrit de long lettres. Nous nous sommes demandé pourquoi il était absent.
And here's a part of the book explanation for the past participle agreement thing (page 62,63) :
"When reciprocal verbs take an indirect object in French, the past participle does not agree.
Ils se sont téléphoné. They called each other.
Vous vous êtes parlé au téléphone. You talked to each other on the phone.
Ils se sont écrit de longues lettres. They wrote each other long letters."
Note : please don't explain in french. My french isn't that advanced yet and it will be super hard to understand it.