early February 2017, Marvel announced that the fifteenth episode of the fourth season was titled "Self Control", written by executive producer Jed Whedon. A week later, Whedon was revealed to also be directing the episode, in his directorial debut. He felt comfortable taking on the challenge after being so closely involved with the series' cast and crew as showrunner alongside his wife Maurissa Tancharoen, and after seeing both his brother (and series creator) Joss Whedon and her brother Kevin Tancharoen directing episodes for the series. Whedon decided to make his debut during the fourth season after doing second unit work under Kevin on the third season episode "Spacetime". "Self Control" was described as "pivotal" for the season, serving as the conclusion of the LMD story arc, and containing set up for the final pod of episodes for the season. On choosing to direct this episode specifically, Whedon explained, "I figured just throw me in the deep end and see if I can swim, and I did write a little bit of a deep end in some of it. I think it worked out." Having Whedon both write and direct this episode meant for star Clark Gregg, "there's really no filter between the voice of this really wild episode ... and us. It's really kind of a pure conduit, which is great, because there's some very radical stuff happening, so it's great to be able to talk to him about it." Writing When working on the season's twelfth episode, "Hot Potato Soup", Whedon had initial ideas of what this fifteenth episode would be, including a confrontation between Jemma Simmons and Leo Fitz where they know one of them is an LMD; a subsequent confrontation between Simmons and Daisy Johnson where they convince each other of their humanity; and then the final sequence where the pair enter the Framework. When the writers came to work on the episode, Whedon realized he had not worked out as much of the episode as he had thought, but these three sequences remained the "tentpoles" of the episode's script. With the LMD Aida killing her creator Radcliffe in the episode, Whedon was asked whether that made her a villain, even the main villain of the whole season. He noted that "She's just doing what she's programmed to do ... she's programmed to protect him and the Framework, and she finds a way to do both that