John Kessel’s last brush with Hollywood was when a producer was interested in his short story, “Hearts Do Not in Eyes Shine,” about a couple who has their memories of one another erased. Then Eternal Sunshine of the Spotless Mind came out.

Not surprisingly, the Nebula-winning author and co-director of N.C. State’s MFA creative writing program calls the upcoming TV adaptation of his story “A Clean Escape” a “sort of a karmic debt.” The dramatization, starring Emmy-winning and Oscar-nominated actors Sam Waterston and Judy Davis, and directed by Emmy- and Oscar-nominee Mark Rydell (On Golden Pond, The Rose) will air as the first episode of ABC’s anthology Masters of Science Fiction at 10 p.m. on Saturday, Aug. 4.

The story, which Kessel says he wrote “in either 1985 or 1986,” deals with the confrontation between a man and his psychiatrist that soon has global implications. In the Writers Guild magazine Written By, series showrunner Sam Egan said he was “taken” by Kessel’s story “due to the controversial content and the political realities we’re in today.”

Egan wrote the script “on spec,” meaning that he wrote a complete script before seeking Kessel’s permission to purchase the rights to adapt into television. “It was a surprise when my agent called me about it,” Kessel says.

Kessel has already adapted “A Clean Escape” as a short play and as a radio production for the Sci Fi Channel’s online Seeing Ear Theatre (visit www.scifi.com/set/playhouse). Kessel credits the story’s versatility in translating to different mediums to the fact that it’s just two people talking in a room.

“One of the things I did when I was writing the story was that the first draft was all dialogueno stage descriptions, no interior monologue, just all dialogue,” Kessel says. “Eventually, I rewrote it as a more conventional story, but it was always dialogue-driven. It translated very easily into a play and radio, and one of the nice things about the TV adaptation is that it’s all therethey moved some things around, but the core of the story, what I wrote, is still there.”

Kessel, who got to visit the set during the filming, praises Rydell’s work. “He’s really an actor’s director,” says Kessel of Rydell, who has directed eight actors to Oscar nominations. “There was one point where Sam Waterston came up to him after a take and said, ‘I think I pushed too far,’ and Rydell said, ‘No, no you didn’tpush further.’”

Kessel also got to see how far the actors went into their characters when he got to talk to Davis between takes to find out how she was handling her character, who has breast cancer. “She said, ‘The hardest part of this is that I feel like I have cancer,’” he says. “She was that into it.”

Though Kessel isn’t expecting big ratings (“They tell me that releasing a new series at 10 p.m. on a Saturday night in August is pretty much like leaving it in a box on the side of the road,” he jokes), he’s pleased with the “first-rate production” and says “the acting is incomparable.” What’s more, he says an Oscar-winning screenwriter is working on a spec script for a film version of one of his other stories. It looks like his Hollywood karma may have turned around.

For a preview of A Clean Escape, visit www.mastersofscifi.com, and for photos from Kessel’s visit to the set, go to his official Web site at www4.ncsu.edu/~tenshi.