Sheldon gets caught in the middle between Amy and Will Wheaton on The Big Bang Theory. "The Habitation Configuration" is the seventh episode of the show's sixth season.
Added:

The Big Bang Theory Season 6 Episode 7 Quotes

Amy: You'll have to forgive me. This is my first time directing. I just want it to be good.
Wil Wheaton: So, do I.
Amy: Great. So, this time let's try more real boy and less Pinocchio.
And action.
Wil Wheaton: And cut.

It's called "Fun with Flags." They're not at half-mast, nobody died. Let's try and keep it upbeat.

Amy