SPOILER ALERT: Do not read if you have not yet watched “I’m Not the Person I Used to Be,” the Season 4 midseason finale of “Crazy Ex-Girlfriend.”

As the CW’s musical comedy “Crazy Ex-Girlfriend” prepares to sign off with a series finale in 2019, showrunner Aline Brosh McKenna and her team of writers have been pushing the characters toward being healthier, more settled individuals. At the center of this evolution is of course the titular character, Rebecca Bunch (Rachel Bloom), who finally received a proper mental health diagnosis, quit the job that didn’t fulfill her to find something she actually enjoys, and has been making amends with those she has wronged. And in the midseason finale of the fourth and finale season, titled “I’m Not the Person I Used to Be,” she finally had a chance to reconnect with Greg (formerly Santino Fontana, now played by Skylar Astin).

“Sometimes in stories about women, people get antsy if you’re not dealing with their romantic life, but Rebecca has tried to take her life, she has a lot to deal with,” McKenna tells Variety. “I personally do not want to watch a show about someone who tries to commit suicide and two weeks later is in a romantic relationship quadrangle, and so we gave ourselves almost an entire season to resolve her personal mental health, emotional, familial, career issues, and that’s been an enormous luxury.”

Back in town for his high school reunion, Greg seemed like a completely different person to Rebecca. His physical appearance was one thing, but his time away in business school and dedication to getting sober aided in his evolution. Greg wasn’t the only one who had changed, though, as Rebecca’s commitment to her own betterment meant she admitted to Greg that she slept with his father.

While such an admission showed growth, it also offered a setback on the potential for them to get back together. But McKenna notes that Greg and Rebecca have “an intellectual, spiritual match” that many of her friends in the story have noticed and many of the viewers of the show have been drawn to, as well, so their story is far from over.

Here, McKenna talks about weaving Greg back into the narrative, what she was looking for in the recasting, and how important it will be to give Rebecca a happily ever after that includes ending up with a guy.

Was there ever any question about wanting to see a return to the character of Greg?

When the character left the first time, it was earlier than we had planned because Santino wanted to go back to New York, so we kind of made our peace with that but then, as we were developing this season, we realized we wanted to go back to that character and that arc, and it felt like we had worked so hard to seal it off because Santino was leaving, so the thing that got us excited and we thought was fun was to reopen it [where] he was so different.

Did the idea for how much Greg had changed shift when you knew you would not have Santino back?

We never went back to Santino — because the only reason that we were interested in doing it was realizing we could have [Greg] back and have him be completely different. The Santino part of it we had already kind of completed, and so the idea here was to bring him back and he’s been away for two years and he’s changed — so much that we could hire a new actor.

Once you decided to recast, what were the key characteristics you felt the person had to have to be able to capture Greg’s essence as he was previously established, but also still be an evolution of him?

It’s not even so much about the different actor — [Greg] is a different guy. He’s been in recovery for two years and in those meetings he’s heard a lot of stories [and] he knows a lot more about what it takes to rebuild a broken life, and so he has a lot more empathy for Rebecca when he comes back and he has a lot more understanding of what she’s been through. The Greg before recovery was always a little bit angry and a little bit neggy towards Rebecca, and that was because he was dealing with his own stuff. But now they have a nice parallel where he’s in recovery and she’s in her treatment, and so they’ve really gained a lot of respect for each others’ humanity because they’re going through something similar. And so we were looking for somebody who could embody that warmth and that change.

Greg changed but so did Rebecca’s perception of him. Did you also toy with the idea that she would question her perception of others and we would see other actors embody the characters around her, just temporarily?

We’ve been with her on the journey and we’ve seen her as she experienced everybody over time, so everybody’s been by her side and if they have changed at all, she hasn’t perceived it because she’s been with them the entire time. What I love is when you see an ex [after] you haven’t seen them for a couple of years, they always do seem super different — almost to the point where you can barely remember the way they were when you were with them, and so that’s such a fun opportunity for us, that I don’t think a lot of shows have gotten, which is to revisit a character after such a long period of time where their separate journeys have given them so much empathy for what the other person has gone through.

Both Greg and Rebecca did so much growing individually, apart, how did you balance how much of those changes you wanted them to reveal to each other when they first met again?

Somebody who has been in recovery for two years, who understands that she has been in treatment for a year and a half, even by not being together, they understand what the other person has been through, so when she sees him, she immediately perceives this more evolved, kind, open-minded, positive, loving person that he’s become through his recovery process.

What was most important about how you crafted Greg’s response when Rebecca tells him about sleeping with his father?

We really wanted to show that this was a guy who, for two years, have been going to meetings and hearing people who have been through all manner of extreme stuff, so he really has perspective in understanding a journey that someone can take like that. He’s heard crazy things. And when we were doing the scene — it was an early scene for Skylar, and that was something that he also remarked upon. He said to Rachel and I, “Well, this guy’s been in recovery; he’s heard everything.” He has heard people stand up and give their difficult truths, and he recognizes that there’s been honesty and forthrightness and a courage to stand up and tell the truth. So he’s upset and he’s pissed and he’s shocked and he’s wounded, but he also sees the courage in what she’s done and that she’s different.

The show has gone so deep with Rebecca’s journey with mental illness, while Greg’s journey with sobriety has mostly been off-screen. What does it look like now that he’s back?

When we saw him leave he had already rock bottomed out and started going to meetings, and so we do continue to see him in meetings after he comes back. This is something that I have a lot of experience with; there are a lot of people that I love who have been through this…and so this is something that I have been through with people and have seen what it looks like when someone gets healthy and how their humanity can expand. So it was really wonderful to show how much this guy has grown up in a couple of years — because he was kind of a jerk to her right from the beginning of the pilot [when] part of the reason he likes her is that she doesn’t like him and that’s what he’s comfortable with. He was that friend-zone guy who was slightly resentful that she was picking somebody else, but he’d known right from the beginning that she was into someone else, so why did he pick her? Before he was in recovery, if you had pointed that out to him, he would not have acknowledged it — but now he understands things like that.

Pivoting to another surprise relationship turn, Valencia (Gabrielle Ruiz) and Father Brah (Rene Gube) had a romantic past in high school. From where did that idea come and how will that affect her own future?

It was a notion that had been floating around the writers’ room for a long time that they seemed like a pair, and I think it grew out of the writing that Father Brah has spent a lot of time talking to Josh about his love life and it seemed really interesting to us that as he’s talking to Josh about Valencia, that possibly he had his own history there. But also, one of the things that’s been really fun to explore writing Father Brah is to make him a really good priest, but also a dimensional person. He’s often the person who comes in and has the answer, and we’ve always wanted to do an episode where you see Father Brah struggling with his own feelings and maybe learning more about his decision to become a priest. I think that’s relatable, and so when we decided to do a high-school reunion episode, those ideas that had been floating around the writers’ room seemed great to explore. We wanted to make sure it was clear it was in the past because the theme of the episode is, can you go back to your past in any way? And they can’t, but Rebecca and Greg? Maybe.

What are the other key themes in the back half of the season? Is it reductive to focus so much on the relationship angle?

It’s a part of her personal journey, and so it’s never the answer, it’s just a part of her personal journey. But also, he comes in at a point when she’s also very connected and feels differently about Nathaniel and Josh than she ever has. Nathaniel is on a journey toward being a much better person than he’s ever been, and she and Josh are very close and they’re living together, so all of the relationships kind of go up a notch in this episode. … We have three guys in love with [Rebecca] at the moment, so there’s a lot to resolve there. The first half of the season was very much a landing place for some of her other personal, emotional issues — dealing with her family [such as] her long-lost brother and her mother, her sense of social commitment after being in prison — and that was by design. Rebecca tries to commit suicide in the first half of last season and we really wanted to spend the time after that to see that a good, long time has elapsed since then. There was an eight-month time jump, she’s made a lot of mistakes, but she seems to be getting her train tracks on the rail here, and we wanted to be really careful and thoughtful about not plunging her back into the rom-com stuff until it felt like she had given herself that real estate. So we really took the first half of the [fourth] season to clear out some of those issues — whether she was going to be a lawyer or not and how she was going to resolve her feelings with her family and her feelings of shame for all of the things she did at the end of Season 3. The first half of the season was her checking the boxes of the things she had not dealt with and, as Paula says in one of the episodes, there’s always a sense she needs to circle back to Greg, and in Episode 8 she starts to do that.

For so long in the series Rebecca has really leaned on Paula (Donna Lynne Champlin), but through that unanswered text chain in “I’m Not the Person I Used to Be,” she really figured out the right thing to do on her own. Is this a turning point?

It’s not a straight line from there! Now Greg’s mad at her and quite repulsed with what she has done. I will tell you that Episode 9 is the most insane episode I think we’ve ever done. It’s bonkers and hilarious, and when you see it, you’ll know exactly why I said that. So it’s not like she told him the truth and all is wonderful. He has a lot to grapple with and so does she, and we know Rebecca Bunch well enough to know it’s always a one step forward, couple of steps back. She has a lot of insight and her mental health is better, but there will still be backslides to come.