Board Thread:Questions and Answers/@comment-29905311-20170130083321/@comment-29905311-20170131172721

Sans does remember the pacifist run. All the dialogue in his fight seems to point to that (he talks about things that wouldn't have happened in True Merciless run, such as attempting to become friends with Frisk and taking them out to eat, etc).

He actually counts how many times you reset. He'll react if you return to be judged twice in neutral/pacifist runs.

If you're being true pacifist, he treats you fairly nice at first, if you're being true merciless, his attitude is the complete opposite. His complete change in attitude would make no sense if he didn't know something (considering he's nice in neutral runs too, so down goes the theory that it has anything to do with monster dust on Frisk's clothes. In order to read Chara's expression at first sight, he must know Frisk and Chara are different by their expressions).

Also, if you killed Papyrus even once in the past, he won't give you advice about blue attacks:

The original, for comparison: https://youtu.be/lYi-PSE0T2k?t=29m52s