Ted and Robin become "friends with benefits" to deal with the stress of being roommates, such as Robin leaving an empty milk carton in the refrigerator, or not taking out the garbage. Marshall catches Robin and Ted having casual sex while he's using Ted's bathroom. Marshall finds it hard to use the toilet at work, because his coworkers seem to judge him when he is walking there. Later in the episode Barney says that he "reads a magazine" at work all the time, but he then asks for affirmation that they are talking about masturbation. Marshall blackmails Ted and Robin: he won't tell Lily and Barney about their casual sex, provided he can continue to use their bathroom. However, Marshall quickly gives in and tells them about it, much to Barney's dismay and jealousy. Barney resorts to breaking old televisions from the dumpster outside MacLaren's to vent out his anger, and when he runs out of televisions, begins buying them to smash, continuously refusing to see a therapist.
Meanwhile, Ted and Robin's arrangement hits a snag when they accidentally kiss each other goodbye on Ted's way out, which they realise is an old reflex of when they were together, and they decide to bring it to an end, to Barney's relief. However, they last less than a day before changing their mind, so Barney resorts to solving all of Ted and Robin's household problems (cleaning the apartment, stocking the refrigerator with milk, taking out the trash, buying a dishwasher etc) to ensure they have no reason to have sex. From this, Ted realizes that Barney loves Robin. Barney continues to deny it to Ted, but flees to Lily, and vents about his heartbreak. Unfortunately, this is in Lily's kindergarten classroom, in front of her students.
Marshall finally decides not to be ashamed and finds that his colleagues' apparent attitude towards him changes as well. He relays his new-found strength in confidence to Barney who finds it as motivation to tell Ted that he is in love with Robin. He tells Marshall that he can use Barney's own private bathroom, which is hidden as part of the wall in his office.
When Robin relays Ted's ending of casual sex to Barney, she thinks Ted was afraid of getting hurt because he's too romantic. She says "He's always like--" and then Barney finally confesses, saying "I love you" to Robin. Robin misunderstands and thinks he is just imitating Ted. They go together for a meal, while Barney doesn't attempt to correct her.
The episode ends with Future Ted restating Lily's earlier argument: "Lily was right: when two exes decide to just be casual, someone always gets hurt. But this time, it was just not one of us". The camera focuses on Barney's lingering gaze on Robin as she is laughing as this is said. Barney then looks to Ted, who is clearly okay with Barney's feelings for Robin.