when does the past participle agree in number and gender with the object ?

Thinking...