This episode was the second of four episodes written for the series by Darin Morgan during its initial run. Morgan had previously written the second season episode "Humbug", which was a stylistic break from the series' norm, being more overtly humorous. After working on said episode, Morgan worried that he had written the script the "wrong" way, and so he decided to write a more traditional "X-Files" story the next time he wrote an episode. To get inspiration, Morgan watched the first-season episode "Beyond the Sea", which features an unreliable criminal who claims to have psychic powers. Morgan was struck by the story and its tone, and sought to write a script that emulated its overall feel. Initially, Morgan was leery about focusing too much on humor, so he decided to make his episode very dark; in the end, however, he decided to lighten some of the mood by adding in some jokes. The tone of the episode was also affected by Morgan suffering from depression, which led to him developing a plot in which the main character kills himself in the end.