Brienne mentions that Jaime swore to Catelyn that he would return her daughters. Gendry tells Arya that Melisandre revealed to him he was Robert's son.
Brienne, updating Jaime's entry in the Book of Brothers, mentions that he was freed by Catelyn in return for an oath to find and guard her two daughters.