I think that had to do with Roxas' underlying thoughts from inside of Sora. If I recall right, Sora indirectly thought of Roxas several times before even knowing about him because Roxas "made" him indirectly think of him.. probably because he didn't want anyone to forget him. (as hinted in Coded?)