When Sean Forbes logged onto Facebook last week, he was confronted with the photograph of a Navy friend, standing in front of a tangerine sunset with his wife and son, smiling into the camera. Forbes had made the post three years ago to the day, after learning that his friend had committed suicide. "R.I.P." Forbes had written on his friend’s page at the time. "I’ve known you and your family 12 years and I’m at a complete loss at your passing."

Forbes’ memorial resurfaced through Facebook’s new On This Day feature, which highlights past posts on a private page and sometimes inserts them into your News Feed. The feature began rolling out to limited groups last Tuesday. "I was just in shock that this would be the image they’d choose," Forbes says. "It’s just such an in-your-face reminder of what happened, and it dredges up old memories and feelings."

Almost immediately after posting his criticism on Facebook, writing that "Not every memory needs to be rehashed," Forbes heard from a friend with a similar experience: On This Day had brought back the last post her friend made before taking his own life. "You’ll get reminders regardless," Forbes says. "Whether a song comes on or something in any given day reminds you, but you don’t need a reminder like that from Facebook for sure."

This isn’t the first time Facebook has had an attempt to capitalize on nostalgia misfire. Last year it promoted its Year in Review feature by displaying an old photograph under a confetti-strewn banner, telling users, "Here’s what your year looked like!" But for users who had experienced loss in the last year, the ads could be devastating. It showed web developer Eric Meyer a picture of his daughter, who died that year. "My year looked like the now-absent face of my little girl," Meyer wrote in a post titled Inadvertent Algorithmic Cruelty. "It was still unkind to remind me so forcefully." For other users, the algorithm chose dead pets, a burning apartment, a father’s ashes, and other jarringly sad images.

So my (beloved!) ex-boyfriend's apartment caught fire this year, which was very sad, but Facebook made it worth it. pic.twitter.com/AvU8ifazXa — Julieanne Smolinski (@BoobsRadley) December 29, 2014

This time around, Facebook says it has taken precautions to avoid confronting users with painful memories. For example, if you listed then de-listed someone in your relationship status, Facebook won’t fill your News Feed with old posts about them, though it may still show them to you if you click the On This Day page. Facebook says it filters for memorialized accounts in a similar way. For either of these filters to be effective, people would need to document loss in a public and machine-readable way, by changing relationship statuses and officially memorializing accounts, and even in that case, such rules can capture only a fraction of potentially painful posts.

Forbes, who does advertising and social media for the Navy, says that the feature should have filters for keywords like "RIP," but that the fundamental problem is that "robots can’t read the sentiment of a post." For that reason, he wishes On This Day was something you had to choose to participate in. Facebook says you can choose to have On This Day posts appear in your News Feed less frequently, but there's currently no way to opt out completely.

"You don’t need a reminder like that from Facebook for sure."

Facebook will likely keep trying to dredge up the past despite repeatedly getting burned for doing so. Nostalgia is a powerful emotion, particularly online, where it’s a countervailing force to the internet’s unrelenting nowness. Facebook and Twitter present you with a stream of things happening now, or in the very recent past; live-streaming apps like Meerkat and Periscope try to close what lag remains, bringing the internet into full real-time presence. Against that you have #TBT and various flavors of nostalgia bait. The headline "Want to feel old?" is such a cliche that at this point it’s used almost exclusively as a joke, but its offer has always been remarkably literal — if you’re clicking, then to some extent you really do want to feel old. You want that nostalgic kick.

With their vast repositories of life events, social networks seem like they’d be in a perfect position to capitalize on nostalgia. If people like to share lists of things that make them feel old, then what about a list made from your own history? Apps like Timehop do that by pulling from Facebook, Twitter, and Instagram. Now Facebook is trying to do the same with On This Day.

"It’s gone and I can’t relive it."

But when you take nostalgia out of the safely generic realm of pop culture and antiquated school supplies, it can hurt. There are obvious mistakes, like Forbes' post and many of the year-in-reviews, where algorithms unearth sad posts that lots of people liked in sympathy, but even upbeat posts can become colored by loss. When Jenna Wortham tested out Timehop shortly after it launched, it showed her photographs of a pet that had died and a friend she’d lost touch with. "Such reminders can be almost unbearably painful, or they can provide the extra nudge to send a ‘hello, again' e-mail," she wrote. Timehop doesn’t employ any filters, but on Valentine's Day it asked users to opt-in, warning of "exes and feels."

"I don’t think nostalgia is necessarily pain free," says Mary Beth Oliver, co-director of the Media Effects Research Laboratory at Penn State. "There’s a reason we call it bittersweet." Done right, nostalgia can be poignant and meaningful, but the line between that and painful is extremely subjective and not the sort of thing algorithms excel at discerning. You could only think that people would always want to be reminded of the things they post if you believed that people are actually as happy and uncomplicated as their curated public personas make them seem.

This is impossibly complex terrain for an algorithm to be galumphing around in

"Even when it’s something that’s happy, if I look at photos of a really happy vacation I had with my family 10 years ago, that’s bittersweet," Oliver says. "It’s great and wonderful, but it’s gone and I can’t relive it." You can already see this happening with On This Day, even when it's functioning correctly. "Wow! Thanks to facebook, four years ago on this day I had the most amazing trip to Denver," one person tweeted last Friday. "It makes me sad how people change."

Revisiting the past is a very personal decision, Oliver says, and people need control over it. "Can you imagine, I have a big cardboard box of old photographs and concert tickets and things throughout my life, can you imagine me letting a stranger go through that box and come into my house and show me what ones to look at? I want to look at it when I want to look at it, I don’t want some robot coming in and telling me how to feel love."

Personal history, memory, nostalgia: this is impossibly nuanced and complex terrain for an algorithm to be galumphing around in. Given the number of misfires with the Year and Review, and the experience Forbes and his friend have already had with On This Day, it seems inevitable that dredging up an old post each day for every Facebook user is going to cause some pain. Given the power of nostalgia, it seems inevitable that Facebook will keep trying to get it right.

UPDATE: Here's another example of On This Day pushing sad reminders. Theo Browne says he posted this to his friend's Facebook page after she was knocked into a coma from a car accident a year ago. "It was the absolute last thing I needed to see the day before midterms," he says.

Verge Video: Can we build a better brain?