Board Thread:General Discussion/@comment-27907368-20160514064034/@comment-26347196-20160514222009

PancryPancreas5 wrote: Actually, Sans doesn't remember unsaved stuff, he notices you have heard his speech before. It's also implied that Frisk does speak to other characters... He will remember if you have killed Papyrus before, evidenced in his warning in case you killed Papyrus, then reset or load at the previous save point before the one in Snowdin Town (not applicable to True Reset).

Furthermore, in Genocide route, he remembers when he killed you and vice versa.