"Sideshow Bob's Last Gleaming" was the fifth episode of "The Simpsons" to feature Sideshow Bob, after "Krusty Gets Busted", "Black Widower", "Cape Feare", and "Sideshow Bob Roberts". Executive producers Bill Oakley and Josh Weinstein believed that every season of the show should contain an episode featuring Bob. However, Bob had already been in four episodes and the writers were having a difficult time coming up with new ways to include him. The first draft of the episode was written by Spike Feresten, a freelance writer who later became known for his work on "Seinfeld". Although he received credit for the episode, the writing staff completely rewrote the episode and very little of Feresten's original script was left in the episode. Oakley describes the episode as "one of the most arduous rewrites in the history of the show" because much of the dialogue had to be re-written.