We're racing toward the end of Series 8. "Flatline" is a comic gem that is also scary, and it does double-duty by advancing some of the themes we've seen so far this season.
As the Doctor attempts to get Clara back home at the same time she started (presumably so Danny won't notice that she's still traveling with the Doctor), the TARDIS winds up over a hundred miles off-target. Worse, the exterior dimensions have shrunk. Clara and the Doctor squeeze out and he squeezes back in to investigate what happened while she looks for clues in the area. When the TARDIS shrinks yet again and the Doctor realizes that he's trapped inside, with only his hand able to reach out of the small doorway, he gives Clara the sonic screwdriver and his psychic paper. "Does this mean I'm you now?" she asks impishly. She places the tiny TARDIS in her handbag, communicating with the Doctor through an earpiece (that also allows him to see through her eyes).
Clara meets Rigsy, a graffiti sprayer on a community service assignment to whitewash his handiwork. Rigsy helps Clara, showing her the house where one of the locals disappeared. The two are menaced by something that comes out of the walls. The two, along with the rest of Rigsy's crew, retreat to the subway tunnels, attempting to stay alive while the Doctor tries to understand the menace. He deduces that these are creatures from a two-dimensional world, trying to infiltrate our three-dimensional one. The timely arrival of a train in the tunnel allows Rigsy and Clara to attempt to ram the creatures. While unsuccessful, this gives the Doctor time to power the TARDIS and devise a plan to send the creatures back to their universe.
The episode is very funny, with both sight gags (the tiny TARDIS; the Doctor's hand emerging from the small doorway to hand Clara various items; the Doctor using his hand to move the TARDIS with his fingers, a la Cousin Itt, in order to get the TARDIS off the railroad tracks) and stinging lines. Early on, as Rigsy asks Clara who she is, she responds: "I'm the Doctor. Doctor Oswald." Rigsy replies, "What are you a doctor of?" The Doctor (in Clara's earpiece): "Of lies." Clara: "I don't know exactly. I think I pick the title just to sound important." The Doctor: "Why, 'Doctor Oswald,' you are hilarious." Later on, as Clara and Rigsy run from the house, the Doctor says to Clara: "You really throw your companions off the deep end, don't you?" At another point, Clara tells Danny "I'm helping him [Rigsy] find his auntie." The Doctor replies in Clara's ear: "Nice. Technically not a lie."
The episode brings together several themes:
* Clara emulates the Doctor. The Doctor sees how he sounds. For example, late in the episode, Clara suggests using a train to ram the monsters. The conductor says there’s a dead-man switch and someone is needed to hold the handle. Rigsy jumps into the cab and starts to move the train forward. He tells Clara he knows he will die in the attempt. Clara responds by placing her hair band on the switch, locking it place. “I really liked that headband,” she tells him, “but I suppose I’ll just take it. And every time I look at it I’ll remember the hero that died to save it.” Although that effort failed, Clara has a flash of inspiration that will restore power to the TARDIS: she has Rigsy spray-paint a door onto a poster, tricking the creatures into using their energy in an effort to open the “door” that doesn’t exist.
* Clara continues to learn how to lie. She talks to Danny on the phone while trying to avoid being killed and makes no mention of being with the Doctor or being in danger. She uses the psychic paper to pretend she's with MI-5 and, of course, pretends to be the Doctor.
* Clara learns what it's like to be the Doctor - in particular, the difficult decisions and tradeoffs that he makes. At the end of the episode, Clara says to the Doctor, "Just say it: I was a good Doctor." The Doctor responds, "You were an exceptional Doctor. Goodness had nothing to do with it."
* Clara learns to embrace her abilities as a leader.
Unlike Clara's reaction to being abandoned by the Doctor and being forced to make an important decision in "Kill the Moon," here she understands and even embraces her role as the one in charge during the Doctor's absence. At one point she muses, "Doctor? What would you do now? No. What will I do now?"
In all, another exceptional episode.