SPOILER ALERT: Do not read if you have not yet watched “Homecoming,” streaming now on Amazon.

Micah Bloomberg and Eli Horowitz’ podcast “Homecoming” explored a caseworker’s bond with a soldier in an experimental program designed to wipe memories of trauma so he would be ready to fight again. But (spoiler alert) over the podcast’s two seasons, that relationship did not come to any sense of true closure. So when Bloomberg and Horowitz teamed up with Sam Esmail to adapt the show into a half-hour drama for Amazon, they knew they had to bring the caseworker, Heidi (Julia Roberts), and the soldier, Walter (Stephan James), back together.

“At the end of the day, this is about people connecting,” director and executive producer Esmail tells Variety. “We started off with these two people meeting for the first time, and we felt to properly bring the season to the end, these two people needed to find their way to each other.”

The Amazon version speeds through Heidi’s memory loss (incurred when she intentionally doses herself with Walter’s medication) and search for Walter, choosing instead to end with her finally finding him. Giving some closure at the end, explains Horowitz, was important to “tell a complete story and respect all parts of the narrative and make something where we’re just as excited or more excited about the final episode as we are the first episode.”

But, Bloomberg adds, they wanted to be sure to find a way to “bring them together that doesn’t cheat but honors what’s come before [and] also gives Heidi an additional new choice to make,” rather than wrap everything up in a neat bow that proves definitively how much Walter remembers Heidi and what they went through in the Homecoming program together.

“We had more time and space to reveal them and we wanted to take advantage of that,” says Roberts. “That whole last scene, we labored over words — literally over the words and where the words are in the scene. But then there’s that last beat with the fork…and I think [it’s] a great way to let the audience interpret how it really closes.”

Changing the ending was far from the only one made in translating the podcast for the screen.

The main goal, Horowitz explains, was to keep “the heart of it” but make sure podcast listeners didn’t know everything that was going to happen. That’s why they brought characters like Walter’s mom and the agent investigating the Homecoming program, Thomas Carrasco, into the story sooner than they had in the podcast, for example.

“Once we decided that we wanted to bring Heidi and Walter back together, it made sense to pull some of that season 2 stuff in and help use that to build to our season 1 conclusion,” Bloomberg explains.

For James, understanding Walter’s home life and his relationship to his mother was imperative to tapping into the character.

“Let’s not just see him as a black American [but] what are your roots; what defines you?” he says. “We see how much Walter’s mom has influenced his rebelling and his decision to join the military — because she said she didn’t want him to — and what that means for young immigrants and their parents often being scared to let them out into a world because they don’t know it.”

Shea Whigham, who plays Carrasco, had only listened to the first season of the podcast before working on the show, so he didn’t have a “template” in mind for how to portray his character. “It was like micro-surgery to try to figure it out,” he says. “I really wanted to start with an explanation of an ordinary guy, doesn’t like or dislike his job, he’s just doing his thing and this pops up on his desk, and this one is ‘I can’t get this one out of my system.'”

In the podcast, Carrasco became “somewhat obsessed” with Heidi, but in the TV series, he’s focused on “a small set of rules,” boxes he needed to check. But over the course of the show, he is forced to see a broader view of the program than he expected and “the moment he smashes that glass door [at the former Homecoming facility], that’s when he is smashing through into another plane of existence, if you will,” says Horowitz.

Bloomberg admits that Carrasco was one of the larger pieces of the “Homecoming” puzzle to resolve during the adaptation process. “The thing with Carasco is he shows up in the podcast asking these questions, but then where is he from and why does he want to know?” he explains. “We could kind of skirt around it, but once you’re seeing this guy and he has a boss and you’re in his office, you end up having to ask these very specific questions.”

Similarly, the character of Colin Belfast, played by Bobby Cannavale, was also tweaked for screen. While he always represented the world of Geist, in the podcast we met other Geist representatives to see the chain of ineptitude that led to such a dangerous program in the first place. But in the television show, he is “our portal into that other world,” Bloomberg says.

The show also dove deeper into the relationship between Colin and Heidi, by showing her interview with him for the job, as well as having him track her down at the diner and get close to her not only to find out how much she remembers of her work but also to sleep with her.

Bloomberg and Horowitz opted not to tell the story linearly, but instead jump between two timelines — the present day as Heidi and Walter work together in the facility, and “about four years in the future” after the program has shut down, Heidi has taken a job as a waitress, and Walter is off the grid.

“The podcast went for a very naturalistic, more straight-forward way of telling it, and we went for a Hitchcock, thriller [vibe],” Esmail says.

The present-day storylines were shot in a widescreen aspect ratio, but the scenes in the future started off shot in a square. Esmail says that was “all driven by the character of Heidi.”

“Heidi’s character didn’t understand the full picture of her life, and also she was always boxed in in that timeline — Carasco was coming after her; Colin was coming after her in that timeline — so we felt that the 1:1 ratio really fit,” he points out.

But as the pieces started to come back for her after she visited the old Homecoming facility, the picture gradually widens as she “gets a better grasp on her past,” he says.

The decisions Heidi made, in taking the job and being a part of medicating soldiers without their knowledge, were “moral and ethical questionable choices,” but Esmail was never worried about having to shoot the character in a way that would inspire sympathy or lessen judgement. Having Roberts in the role, he says, did that all on its own.

“Julia plays it with such vulnerability that you understand it on a very human level and you see that it’s about a very vulnerable person struggling to understand what’s going on, struggling to understand what the rules should be, and she’s never doing it for nefarious means even though it might have nefarious ends,” he says. “You can make that character do the most evil, conniving things, and it won’t come off that way because of the skills she brings.”