This is a problem as old as the game: How does a DM get the players to stop just outright slaying all NPCs, but more specifically the "good guys". Assuming that the PCs are at least sort of good, or at least want open access to good/neutral civilization.
Persuade them to be enthusiastic about the campaign premise
before the campaign begins. Don't try to get them on board
after things are already going wrong.
This is not a problem in my Hard Fun Old School Unfair Unbalance style games. So here is what happened over the weekend:
<snip>
After the slaughter fest, the PCs flee the city and go to hide in some caves. And this ends the adventure for the night. Of course, next game brings up the problem: what will the city do about the most vile and evil mass murderers in all of history.
IMO? This is 100% a "time to sit down with the players and figure out how the hell this went
so wrong." Because this sort of thing pretty much guarantees that there was a miscommunication or misunderstanding between you and them.
Sure you could just ignore it. But most DMs like to have a bit more 'reality based games' where consequences matter.
I'm not really sure why you phrase it this way. This isn't about consequences anymore. It's about "the players did something that breaks with the spirit of the campaign, in a way that has shocked and concerned the regular DM" as you say below. That, alone, should tell you that
something didn't work out right between you and them.
I sent the game notes to the games DM, and he was a bit shocked the players did the murderfest. There is a chance, he said, he might need me to cover the game next week. So that puts it back to me of what might happen. My reaction would be the super harsh way...killing the characters. And maybe reseting the game with some time travel or something like that.
Unfortunately, "the super harsh way"
might work...or it might end up hardening the players' hearts, making them even more committed to their murderhobo ways, just making sure they never get
caught. Or, worse, they might simply riot and wait for their usual DM to return, at which point they can badmouth you and persuade them that none of this should have happened. Which, I dunno, maybe you're okay with that, maybe you aren't, but "the super harsh way" certainly has the potential to backfire spectacularly.
But this leaves the issue of talking to the players. I'm not really a fan of talking. They think they did nothing wrong by slaughtering so many NPCs, but then still "get" that they had to flee the city as they are now mass murderers. I know from many past "talks" that nothing much will come from such a talk. I'm sure the players will say "anything in the game that gets in my characters way will be slaughtered!!!!!!", as that is exactly what they did.
But....here I am. Asking for maybe another view point? Is there anything new to say on this topic? I guess someone might say that a game must have a session zero where the DM very slowly and carefully tells the players the way good, evil, slaughter and common sense work in the game. Though in this case it's not "my" game. Still the players "get" that it was wrong to slaughter all the guards......but that did NOTHING to stop them.
So, anyone?
Being perfectly honest, "I'm not really a fan of talking" sounds to me like there is no solution to this problem. You don't want to talk to them, you don't believe that if you
do talk to them that you'll get anywhere, and you believe that they have accepted something which, to you, is an inherent contradiction in terms (they have accepted that what they did was wrong, while still believing they
should do a thing they consider to be wrong.) Any non-talking solution involves punitive action, which the players are very likely to interpret as "that jerk DM getting mad at us," rather than "well, well, well, if it isn't the consequences of my own actions," or at the very least, "ah, we got caught, time to double down and get better at
not getting caught."
But, if you're still looking for a solution, I recommend asking each of the individual players privately, "What did you think of this session? How would you do it differently, if you think anything should have changed? Do you think it's normal or appropriate to kill city guards just doing their jobs?" I would also recommend talking more closely with their normal DM and asking why he is surprised by their behavior--perhaps there's a nugget of information you don't know. E.g. (and I know this might not apply, just bear with me) maybe this DM only uses a battle map when combat is essentially inevitable, so the players went murderhobo because they saw a map and assumed "oh, we're screwed either way, better get this over with." (That actually happened to someone on this forum, a while back, so it's not unprecedented.)
Once you've gotten feedback from the individual players, review it, see if there's anything
you could have done differently. Even if nothing you did seems wrong, approach the group as a whole with an open mind. If the players agree that killing the guards is genuinely wrong, work with them--few people ever do something they
genuinely consider wrong simply because they can. Coming to the discussion having already decided that everyone deserves to be punished is counter-productive and likely to just make the situation worse.