Costume Contest

"Costume Contest" is the sixth episode of the seventh season of the American comedy television series The Office, and the show's 132nd episode overall. Written by Justin Spitzer and directed by Dean Holland, the episode aired on NBC in the United States on October 28, 2010. This episode received positive reviews.
In the episode, Michael freaks out when Darryl goes over his head by taking an idea to corporate. The employees partake in a Halloween costume contest in the office. Meanwhile, Pam tries to get the truth from Danny about their dating history.
The office is excited over the annual Halloween costume contest, the winner receives a Scranton-area coupon book. Oscar Martinez, frustrated that no one else seems to realize what a meager prize a coupon book really is (as it is worth over $15,000 in savings, however the rest of the office thinks that is the actual worth), changes out of his costume and snarkily states that he is dressed up as "a rational consumer". The significance of this gesture goes over the other workers' heads, and Oscar becomes increasingly embarrassed at being virtually the only person not in costume. Pam Halpert persistently begs Jim Halpert to wear a matching couples costume of Popeye and Olive Oyl with her, but he refuses as he feels he is too old for costumes. As the day goes on, several people realize their costume might not win, so they leave the office to switch into something more recognizable or provocative.
Gabe Lewis informs the staff that delivery drivers can now suggest additional products for the customers they deliver to, increasing sales for the company. Michael Scott realizes this idea is similar to a suggestion made by Darryl Philbin, which he had shot down. He now realizes this was a mistake and apologizes to Darryl, and Darryl says he holds no grudge against him. However, Michael feels increasingly uncomfortable at Darryl not receiving credit for his idea, and announces to the entire office that he is going to confront corporate about stealing Darryl's idea. Gabe tells Michael that Darryl actually pitched the idea to him, and has already received credit.
New salesman Danny Cordray invites everyone to a Halloween party at his bar after work. Almost everyone in the office is aware that Danny and Pam had a two-date fling four years ago. Kevin Malone and Andy Bernard tell Danny that they are not going to his party because Pam does not want them to, which incites Danny to confront Jim and Pam. They reassure him that Pam does not care if people go to his party, and the three laugh about how their coworkers have been exaggerating the significance of his two dates with Pam; however, it also becomes clear that Pam wants to know exactly why she was rejected. When Jim confronts him, Danny says he never called back because Pam talked about Jim during their dates. Pam reveals she never mentioned Jim, and so Danny reluctantly admits that he found her too "dorky." Though Jim is offended, Pam is satisfied at having a reason, and leaves the situation at that. Jim realizes he loves Pam for being so dorky, and comes into the office wearing his Popeye costume and carrying Cece (dressed as Swee'Pea), much to the delight of Pam.
Michael is angered that Darryl went over his head, and tries to get Darryl to apologize in front of everyone for 'backstabbing' him. Darryl refuses, criticizing Michael's poor judgment of his idea. Michael changes his costume to Darryl's warehouse uniform, and mocks him. The two bring their argument to Gabe, where Darryl expresses his opinion that Michael has never done anything for him. After some negotiating by Gabe, Darryl and Michael both agree to complain to CEO Jo Bennet if Gabe ever rejects either of their ideas and they apologize to each other. Darryl wishes he were still operating down in the warehouse, but Andy inspires Darryl to further his career at Dunder Mifflin.
Oscar is declared the winner of the costume contest. A series of interviews reveal several employees' reasons for voting for Oscar – Kelly Kapoor voted on who she thought was least likely to win, Ryan Howard for the underdog, and Creed Bratton because he thought Oscar was wearing an excellent Edward James Olmos costume.
"Costume Contest" was directed by Dean Holland, an editor on the series, and written by Justin Spitzer. Holland also directed the fifth-season episode, "The Duel". It was the second episode to feature Timothy Olyphant, who was billed as a special guest star, in a guest appearance as Danny Cordray. David Koechner appears as Todd Packer, last seen in the sixth-season episode, "St. Patrick's Day". With the seventh season of The Office being Carell's last, the writers decided to divide the season into two distinct halves; the first half would "celebrate Carell's finale year and highlight different actors on the show", whereas the second half would focus on his departure and the search for a new manager. As such, "Costume Contest" was one of the first episodes of the season to specifically highlight other characters, in this case Robinson's character, Darryl.
Within the week of the original air date, Hulu released four deleted scenes from the episode. In the first 87-second clip, Dwight and Michael try to destroy Darryl's idea by having a fake fight which eventually fails. In the second 79-second clip, Dwight kisses up to Darryl in case he is promoted. In the fourth 50-second clip, Toby and Kelly explain why they want the coupon book while Oscar looks for something good in the book.
In its original American broadcast on October 28, 2010, "Costume Contest" was viewed by an estimated 8.07 million viewers and received a 4.0 rating/11% share among adults between the ages of 18 and 49. The episode's rating improved 15% from the previous episode. In Canada, the episode was watched by 826,000 viewers.
The episode received positive reviews from critics. James Poniewozik of Time said, "It started excellently with "What can Stanley ignore" precredit sequence and it rolled on from there." He also said that this episode contained a number of nice character moments. Joel Keller of AOL's TV Squad called the episode a "slow-building but ultimately winning episode". Margaret Lyons of Entertainment Weekly called the episode "the funniest episode of The Office since season 5".