Undercover When Alone is what happens when, in order to maintain the surprise for the audience, a character continues a façade of some sort even when there is no one to see them. This frequently occurs when a character is The Mole, and finding out the mole's identity is a significant part of the plot.
Can be Justified if a character fears being watched at any moment (especially if they're right). Also, the character may keep up the façade at all times just to stay in practice and reduce the risk of slipping up in front of witnesses. Can't be too prudent, after all. Another possibility is that the false persona is starting to affect the character's actual personality. In works with No Fourth Wall, keeping their cover a secret from the audience is a legitimate excuse. Finally, sometimes the answer is simply that the writers themselves didn't know that the character was the mole because they hadn't written that far ahead yet or the writers hadn't yet informed the actor that his character had Hidden Depths — in which case the twist is just an Ass Pull.
Note that this doesn't necessarily have to involve a mole, but can be any situation where a character is hiding something from the rest of the cast. Maybe they simply have a secret, or are planning a birthday party, or are a serial killer. As long as the audience isn't supposed to know, and they acted like the secret wasn't the case when there was no one to fool but the audience, it counts.
A form of Red Herring and the opposite of Foreshadowing. Often a sign of an Ass Pull and/or Retcon. Compare Identity Concealment Disposal. Contrast Traitor Shot when Bob reveals himself to the audience immediately after the other character has left the room and Revealing Hug where Bob reveals himself even when there are other characters present, as well as Manchurian Agent, where the character does this because they themselves don't realize they are the mole. See also That Mysterious Thing. If the entire cast is hiding something from the audience that they already know, it's a Tomato Surprise.
As this is a Betrayal Trope, unmarked spoilers abound. Beware.
- In Judge, the protagonist Hiro's private thoughts paint him as being a victim of the titular Deadly Game who is just as clueless as everyone else as to what is going on, but the ending abruptly reveals that he was one of the organizers of the game and was pretending to be a victim all along... somehow.
- In Mobile Suit Gundam Wing, this begins to happen to Lady Une when her Saint Une persona seeps into her personal time but is a sign that she is Becoming the Mask.
- In Naruto, Obito Uchiha puts on the happy-go-lucky Tobi persona even when he's far away from his partner Deidara when he's forced to flee.
- Finn from Phantom Thief Jeanne does this. Especially jarring when she gives her monologues about the evil of Access and Sinbad while being The Mole all along.
- Anthy from Revolutionary Girl Utena turns out to have been acting as Mamiya with Mikage, tiring her out from the extra work. Not only does she fool Utena and the Student Council, but even Akio, whom she has absolutely nothing to hide from, gets fed up with her constant façade at one point. Every time she is shown alone she acts the exact same way. At some point, she is in her bed wondering why she's been so tired lately and there was absolutely no one with her, no Utena nor even Chu-chu.
- Sailor Moon: The Sailor Guardians and Tuxedo Mask have an odd habit of calling each other by their disguised alias whenever they're in that form, even if no one else is listening.
- From the infamous Spider-Man Clone Saga: Multiple:
- Richard and Mary keep up the pretense of being real humans even when alone — Richard goes as far as having flashbacks from his days as a political prisoner and nightmares. Funny, considered they're revealed to be robots.
- Norman Osborn, when writing his journal explaining what exactly he was up to during the saga, mentions Aunt May's death — later, it's revealed he faked her death using a highly trained actress, meaning he was lying in his own journals.
- Wonder Woman (1987): While it's quite clear Champion was always intended to be Hercules in disguise, he maintains that disguise even when alone in the privacy of his own home.
- Frozen: Hans smiles like he's quite taken with Anna, right after they first met. On the edge of a deserted market in the water, under a boat, when no one is watching. It can possibly suggest that he felt some attraction to Anna, even if he was willing to let her die for the sake of his plans.
- Since Clue has multiple endings, this can happen in scenes where the killer appears to be scared for no apparent reason, such as Ms. Scarlet being hesitant to look behind a curtain and Mrs. Peacock hitting a furnace she bumps against.
- Fantasy Island: Melanie admits at the end of the film all of her earlier actions were an act to get revenge, but in several of the scenes she was alone, panicking, and talking to herself about how to escape and survive. She also thought up an escape plan, which very nearly succeeded, by contacting a waiting plane in order to leave the island. None of this makes sense if she was only pretending the entire time. However, this is justified as she was recording herself at various points to help sell the illusion that she was an innocent victim, as she explicitly wanted to get her potential victims together so that they would know why she wanted them dead.
- The House With a Clock in Its Walls: In her disguise as the neighbor, Selena is seen whispering to her dog that Lewis and Florence are crazy while watching them work on their house, well out of their hearing range. Given that she's the Big Bad who knows why they are doing this, and is standing well out of their earshot, that's an odd statement to make.
- In the Bruce Willis/Halle Berry thriller Perfect Stranger, Berry's character is snooping around Willis' apartment looking for evidence of who the killer is (unbeknownst to the audience, it's her). When she finds evidence that seems to indicate that it's Willis' character, she becomes visibly scared. Apparently this is because the ending was changed to make her character the killer, all logic be damned.
- In Tiger House, Kelly finds Mark's stepfather tied up with a bag over his head in the back of the robber's van. However, it is later revealed that he is actually the Inside man for the robbery. While making it appear he was a hostage would have been useful during the getaway, one would think they would untie him once they got back to the house.
- In Tropic Thunder, actor Kirk Lazarus (played by Robert Downey Jr.), insists on staying in character, even when the cameras are not rolling, until "I do the DVD commentary.
- In Vlog, Brooke appears genuinely shocked when she opens the website containing the videos of her friends' murders and cries on seeing it. However, as she is the killer, she already knows what is in it, and as she is alone, she has no reason to act. (In fact, she has no reason to open the site at all.)
- Burke recalls a prisoner who was faking insanity, who said the key was to keep up the pretense the whole time, even when you're alone in your cell.
- In Dragon Bones, Ward kept his Obfuscating Stupidity cover even when alone, or at least did nothing more suspicious than reading books — the local Friendly Ghost and Genius Loci, Oreg, who can see everything that goes on in the castle, was surprised when Ward showed signs of intelligence while talking to him. Justified in that one of Ward's strategies is to keep his face looking stupid, which is easy to do — apparently, some expressions that look merely neutral on other people's faces look stupid on Ward, due to his brown, cow-like eyes.
- In the Dr. Watson at War series by Robert Ryan, this is used for a Bait-and-Switch where an innocuous British schoolteacher turns out to be a German Femme Fatale Spy, even though her private thoughts had her mourning a (non-existent) brother who had been killed by the Germans. After The Reveal, she says that to successfully carry off a fake identity you need to believe in it, even in your thoughts.
- Firestarter: Rainbird poses as a lowly janitor working for the Shop to gain Charlie's trust and takes the role very seriously. He stays in character even if Charlie is not around, exchanges his luxurious car for a humbler one, and always uses the employee changeroom to get into his work uniform. His motivation for doing so is that he wants to fool not just Charlie, but also all Shop employees working directly with her because he fears that otherwise rumors that he is not who he claims to be will eventually reach Charlie.
- Exceedingly common in Goosebumps books, particularly books where the main character was a monster all along.
- In one Lord Peter Wimsey story, Lord Peter goes undercover to infiltrate a criminal gang. He stays in his cover personality even when alone, to ensure he doesn't accidentally slip out of it when he isn't.
- Renata Kleber, a.k.a. Marie Sanfon in Murder on the Leviathan is a master of disguise who doesn't drop the act even in private and even in chapters told from her POV.
- In A Song of Ice and Fire, when "Alayne" (actually Sansa in disguise) attempts to drop the act in private, Littlefinger invokes this trope. As he points out, when you think nobody is watching is actually the most important time to keep acting — because you never know who's about to walk through the door.
- In The Stars, Like Dust by Isaac Asimov, Hinrik, the leader of Rhodia, appears to be a weak, feeble-minded puppet for his planet's overlords, the Tyranni. His cousin, Gillbret, believes that there's a secret rebellion brewing, and longs to join it. At one point, Gillbret opines that he has to pretend to be loyal to the Tyranni, even when alone, so that he never slips up. Another character points out that Gillbret really isn't that good at The Masquerade, and realizes that somebody who really played the part would act more like Hinrik. This leads him to the realization that Hinrik is, in fact, the leader of the rebellion, who's been playing the part of a loyal vassal for 20 years.
- Star Wars Legends: In the New Jedi Order novel Rebel Dream, two intelligence agents, Voort "Piggy" saBinring and Sharr Latt, both Wraiths, argue about whether Jaina Solo should resort to this. (She's not The Mole, but she's pretending to be a goddess because of reasons). Piggy believes she can drop the disguise when she's around those she trusts implicitly, whereas Sharr thinks she should keep it up all the time.
- In the first season of 24, Nina sniffs out a fake FBI agent at the hospital, tries to get his fingerprints but fails, and then takes Teri and Kim out of the hospital to a safehouse. In the finale, Nina is revealed to be a mole working for the bad guys. No one else noticed the fake FBI agent, so there was no one for her to impress.
- In Angel, Knox acts puzzled when a large sarcophagus gets delivered to his lab. Turns out he not only knew it was coming, he ordered it, for it contained the essence of his god. Given the nature of his employer, this was presumably for the benefit of any surveillance cameras (or more supernatural forms of monitoring) that might be watching him even while alone.
- Arrow: After The Reveal that Emiko Adachi was Evil All Along, the audience is left to wonder if Emiko visiting her father's grave and Talking to the Dead was just an act for when her half-brother Oliver Queen tracked her down, or because her desire to be acknowledged by her father had never really gone away.
- Invoked and examined in-depth in the final season of Burn Notice, which revolves around Michael's attempt to infiltrate a terrorist organization. The trope is played completely straight, and the voice-over often points out the difficulties of being undercover 24/7 (illustrated as Michael slowly loses touch with his real self and priorities over the course of the season).
- In season 2 of Dexter, Maria Laguerta is scheming to get her superior fired by pretending to be her friend when she's having marital difficulties. However, when a fight between her superior and her fiancé occurs while Laguerta is in the office, Laguerta curses to herself (before she's spotted by them). Given the later reveal that she orchestrated the fights between the two, this was perfectly according to her plan.
- Doctor Who: In "Time-Flight", why the Master maintains his cover as Kalid, including the strange mystical chanting, while alone is anyone's guess.
- The Reveal that Boyd was the head of the Rossum Corporation in Dollhouse creates several examples of this. In an interesting variation, one example had him stay in character for a Doll in a Flash Forward... whose mind he would soon wipe anyway. This is an example of the writers not having decided that he was The Mole yet, which led to internal inconsistencies with the flash-forwards.
- The Gossip Girl finale revealed that Dan Humphrey had been running the gossip blog through the entire series. This means that whenever he reacted to a shocking Gossip Girl blast while alone, he was just reacting to something he himself posted.
- In Jupiter's Legacy, Walter feigns ignorance of his own plans within psychic mindscapes he created, and pretends to get caught off guard by things he put in place. One might expect this behavior is a protection against other telepaths learning what he's up to, except it doesn't do that.
- The Lord of the Rings: The Rings of Power: Sauron as Halbrand, has many moments where he looks genuinely upset, detached and conflicted when he is alone, blurring even more the border between the moments he was deceiving or genuine.
- Masters of Horror: In the episode "Family", a happy couple move in next door to a Serial Killer Villain Protagonist who is later revealed to have murdered their daughter and everything was part of a plot to get revenge on him. However, despite their knowledge of his true nature they seem to take no caution whatsoever, still acting completely blissful and don't discuss their plan even when they're not in his presence.
- People in costumes at the Disney Theme Parks are required to stay in character and keep their costumes on, even in "backstage" areas, at almost all times. This was in response to various incidents where curious children snuck into staff-only areas and quietly observed them taking off their costumes, or behaving like their normal selves when in costume without them knowing, destroying the illusion and upsetting the children. Since the staff can never be sure when kids are watching them, they can only act out-of-character and remove or put on their costumes in very secure areas far away and physically inaccessible to guests.
- In Fire Emblem: Three Houses, Flayn and Seteth pretend to be siblings rather than father and daughter to conceal the fact that they are actually Saint Cichol and Saint Cethleann. They keep this façade even when no-one else is around until their last support conversation when Flayn calls Seteth "father" and points out no one is around to hear them anyway. If you complete their Paralogue, they will tell Byleth about their relationship, but not their true identities. They also drop the act if you end up killing them on the Crimson Flower route, with Flayn calling Seteth "father" In her dying moments, or if you kill Seteth first. This is a justified example because all of their conversations take place within Garreg Mach monastery where Seteth fears being overheard.
- One of the Player Characters in Heavy Rain is so good at concealing said character's real intentions that you cannot guess them even if you overhear said character's private thoughts. Fridge Brilliance kicks in once you realize on a second playthrough that most of his thoughts during key story moments can have a double meaning once you know his true identity.
- In Persona 3, you can watch various security recordings of the inhabitants of the dorms' daily lives, including some particularly embarrassing moments. In Ikutsuki's recording (who, as S.E.E.S.' advisor, is most likely the one in charge of the dormitory and presumably knows about the cameras), in which he writes up a report about the second Full Moon incident and gets sidetracked thinking up puns, he acts like the goofy, affable Pungeon Master you know him as, rather than a nihilistic madman who wants to bring about the end of the world.
- A Justified example occurs in Persona 5, after Joker has seemingly been assassinated by Goro Akechi with his death being reported as a suicide. The protagonist's teammates react to the news report with silent shock and horror. It's revealed shortly afterward that they had actually known Akechi was going to betray them and came up with a plan to fake Joker's death and were thus pretending to act shocked when the news broke out even if they were by themselves just in case The Conspiracy Akechi works for was watching them. Some of their reactions may have also been genuine as they wouldn't be able to immediately know if their plan had succeeded.
- The Heroes Interquel webcomics feature a major plot about a Well-Intentioned Extremist using the alias Els Dropper trying to take down The Company with ruthless means. Evs is finally revealed to be Connie Logan, who is being aided by her daughter and field partner Penny. In their debut appearance, the two act like dutiful Company agents whose only concern and preoccupation is Penny's dating life. Word of God implies this is due to Writing by the Seat of Your Pants on the writer's behalf.
- The Last Days of Foxhound, a comic starring the Quirky Mini Boss Squad from the first Metal Gear Solid, essentially had to do a retcon to turn Ocelot, the series' Magnificent Bastard, into this. Early in the comic's run, Ocelot was clueless about the Patriots, and while dangerous, was on occasion easily overpowered by his psychic/psycho teammate Mantis. Then Metal Gear Solid 3: Snake Eater came out during the comic's run and revealed that Ocelot had been working for the Patriots at least since the 1960s. The comic's creator, Chris Doucette, had to change everything into Ocelot pretending that he knew less than he did in order to become The Mole to multiple sides on behalf of the Patriots.
- The Order of the Stick:
- Under Tarquin, the Linear Guild avoids revealing to the readers that Malack is secretly a vampire until the protagonists find out on their own. Discussed by the Genre Savvy Tarquin after The Reveal:
Tarquin: Well, we're standing around talking about it openly, aren't we? If the protagonists didn't know Malack's secret, we'd still be speaking far more circumspectly about his "condition" and such — despite the fact that everyone in the room already knew.
Kilkil: Oh, you mean like how we're conspicuously avoiding discussing the fact that before we left the city, you—
Tarquin: Now you're getting it!
- The High Priest of Hel maintains the pretense that he is simply Durkon turned into a vampire, rather than a separate character possessing Durkon's vampirized body (primarily by copying Durkon's accent) even when no one can actually hear him. Panel 5 of this strip, for example. Given the nature of the comic, maintaining his cover to the readers could be a valid in-universe motivation.
- Under Tarquin, the Linear Guild avoids revealing to the readers that Malack is secretly a vampire until the protagonists find out on their own. Discussed by the Genre Savvy Tarquin after The Reveal:
- In an episode of Archer, ISIS is being infiltrated by an enemy agent going by Conway Stern. At one point when he believes himself to be alone, he mutters to himself, "Conway, what have you gotten yourself into?" His last line in the episode was, in fact, him saying that it was not his real name. Then he came back years later, and it turns out "Conway" was his real name.
- Avatar: The Last Airbender: When Iroh and Zuko are hiding as refugees, Iroh comments he can't find any spark rocks to start a fire to make tea. As a Firebender and in the privacy of his own home, this shouldn't be an issue. He still goes to their neighbors' and borrows a set, rather than bend the fire. Of course, given that he had suspiciously warm tea in the previous episode and Zuko berated him for doing such, it could be that Iroh learned his lesson. Turns out he was Properly Paranoid, as Jet was the one who stole the spark rocks, and was watching through the window, hoping to catch Iroh bending fire.
- Many of the fake ghosts and monsters in Scooby-Doo remain in character when alone, even though it is of no possible advantage for them to do so.
- At the beginning of The Scooby-Doo Show episode, "To Switch a Witch", a cemetery caretaker is working alone when he sees the Monster of the Week, screams, and runs away. It later turns out that he and the person in the monster costume are partners, raising the question of why he acted so terrified before there were any witnesses around.
- In The Scooby Doo Show episode, "The Creepy Heap from the Deep", once the gang goes on their way, a character bolts his door to keep out the monster and then seems shocked and terrified when the monster appears behind him. This makes little sense once it turns out that he and the person in the monster costume are working together.
- In The Spectacular Spider-Man, the Green Goblin spends the second-to-last episode cackling to himself and reciting lines from A Midsummer Night's Dream (and rhyming even when he isn't). This would make sense if the Goblin was insane, as in most continuities, or Harry, who is mysteriously absent from his school play at this very moment, but in the next episode, we learn that neither is the case here.