content: 
  ===Writing===
  The episode was written by series co-creators David Benioff and D. B. Weiss.
  "The Dragon and the Wolf" was written by the series' co-creators David Benioff and D. B. Weiss. In the "Inside the Episode" featurette published by HBO following the airing of the episode, they described the meeting at the dragon pit as one of the most challenging scenes in the episode to write, as they felt it was important to give each character their due. Weiss described the many different interactions between various characters as "deceptively difficult", and the necessity for the actors to be "playing off the person they're supposed to be playing off of" for the scene to be properly translated during the filming process.
  For the culmination of the Winterfell storyline, and the death of Littlefinger, Benioff and Weiss stressed the importance of the scenes leading up to the finale, which they described as a realistic threat of harm between Arya and Sansa, with Benioff saying "It's one of the benefits of working on a show like this, where over the years so many beloved characters have been killed, and so many characters make decisions you wish they hadn't that you can believe Sansa might conspire against Arya, or that Arya might decide that Sansa has betrayed the family and deserves to die." Benioff continued by revealing his excitement in seeing Aiden Gillan's performance as Littlefinger, as it was the first time that they had written a scene in which the character was caught unaware, saying "He's imagined every conceivable eventuality except this one." Isaac Hemsptead Wright, who portrays Bran, described a scene that was originally written between his character and Sansa, but it was later removed from the episode.
  Another challenge involved with writing the episode involved the presentation of the information regarding Jon Snow's lineage, as it mostly consisted of details that had already been revealed in prior scenes. As such, the inclusion of a montage, of Rhaegar and Lyanna, and Jon and Daenerys, was one of the ways that Benioff and Weiss stated they were able to go about this problem. Weiss noted that it was important to make it clear "that this was almost like an information bomb that Jon was heading towards." Benioff continued by describing Jon and Daenery's intimacy as a complication "on a political level," and "on a personal level," due to the two being related, with Weiss adding "Just as we're seeing these two people come together we’re hearing the information that will inevitably, if not tear them apart at least cause real problems in their relationship."
  In writing the final interaction between Jaime and Cersei, Benioff felt it was important to convey Cersei's refusal to confide her plan to abandon the agreement to fight the White Walkers and subsequent alignment with Euron and the Iron Bank, and its effect on Jaime, saying "He's realizing that his loyalty to her is not reflected in her loyalty to him. I think that's absolutely what informs his decision to leave King's Landing."
  Leading up to the seventh-season finale, Benioff and Weiss revealed that it was always planned for the penultimate season to end with the destruction of the Wall, and the White Walker army crossing into the Seven Kingdoms. Weiss noted, "The wall's kept these things out for eight thousand years and there's no real reason it can't keep doing that unless something puts a hole in the Wall. There's one thing on the board from the beginning that is now big enough to do that and that's a dragon." They also felt it was essential for the seventh-season finale to contrast well with previous season finale episodes, particularly the sixth-season finale, "The Winds of Winter", which Benioff stated had a more "triumphant ending" as opposed to something "much more horrific" with the conclusion of "The Dragon and the Wolf".