The following contains spoilers from this week’s Person of Interest.

On Tuesday night, CBS’ Person of Interest — as it is now almost expected to do during its “trilogy” events — dealt viewers a devastating blow when Shaw put her life on the line (and seemingly lost that bargain) in the name of assuring the rest of Team Machine safe escape from Samaritan’s equally trigger-happy troops.

The bad news? Viewers may have seen the last of Shaw, at least among the living. The good news: The character’s exit was orchestrated for the most joyous of reasons, as Sarah Shahi is pregnant with twins. TVLine spoke with the actress about delivering her doubly good news to her bosses, getting an amazing death (or “death”) scene, Shaw’s tombstone and what, exactly, was behind her kissing Root.

TVLINE | First of all, congratulations on expecting twins — I have a pair of 12-year-olds, and it’s been an amazing, amazing experience.

And you’re alive!

TVLINE | Well, the first couple years can be hairy. When did you first go to the producers with your news, and what were your expectations for that conversation?

It was a series of kicks to the nuts, I feel like. I wasn’t feeling well when the season began, and the pregnancy wasn’t anything we were trying for. So you take the little test and it came out pregnant. So I was like, “Ahhh, s–t. OK…. Jonah [Nolan], Greg [Plageman], I should tell you something,” and they were like, “Wow, that’s great! How far along are you?” I then went to the doctor and he held up two fingers, and since he’s kind of a hippie, I thought he was saying “peace.” Then I saw my husband hyperventilating in the corner, and he had to spell it out for me. And there are no twins in my family at all, so he could have said, “You’re having a unicorn!” — that would have made more sense. Then I went to Jonah/Greg again and said, “By the way… I’m having twins.”

TVLINE | Which probably accelerates things, such as your availability.

Yeah. It was as early as the second episode that I went to them with the news. I was feeling so ill, there was no point in trying to hide it. They were wonderful and so, so supportive, even though I felt like I dealt them a series of double whammies.

TVLINE | What if they had turned around and said, “OK, we’ll make Shaw pregnant”?

Well, we talked about that, actually. Because that would have been much easier, in some ways. But they decided that there’s no way in which this character could be maternal. You can’t put yourself in front of death every single day and want to have a child, or have a child. It doesn’t make any sense for her, at all. Had they [written it in] I would have been happy because it would have been a bit easier to handle. It’s a lot trickier to have to hide things.

TVLINE | See, I didn’t even notice until I posted a teaser video the other day and a couple of readers were like, “I bet Sarah Shahi is pregnant, she’s been wearing big coats….”

[Laughs] I know, I had a few people say something to me too, and this was over a month ago. I was like, “What?! Why would you even say that?” But yeah, it is tricky to hide, and for the most part we just did a lot of close-ups. Also, you can take the “girls” out, because the ta-tas grow…. You try to distract the viewers’ eyelines and make them look up.

TVLINE | Do you consider your character to be dead?

That’s a very good question. A very good question. That’s one I have not been asked. Do I consider her dead…? [Pauses to think] Wow. I don’t know.

TVLINE | That’s fine. You can take a pass.

I mean, I’m genuinely thinking about it, and it’s just…. I’m trying to look at it from all perspectives.

TVLINE | The only reason I’d say “no” is because she is a come-hell-or-high-water survivor. You just don’t know with her.

That’s what I’m thinking, too, because you don’t actually see who had the last shot. I could have had the last shot. I can say “no,” but the intention is the writers’ and where they’re going with it. But I don’t think Shaw goes into any situation expecting to die. There was this debate on set about that kiss [with Root], about what it meant. “Is it a goodbye kiss?” I never thought of it as a goodbye kiss.

TVLINE | Oh, I never thought that either.

Yeah, I didn’t think that Shaw would go into any kind of situation — even if she’s outnumbered – thinking, “OK, this is it for me. I’m a goner.” She’s more like, “F–k these guys, I can take all of ’em.” So I do see a world in which Shaw was the one who pulled the trigger, and killed Martine.

TVLINE | As quote-unquote “death scenes” go, could you have possibly asked for better?

I don’t think so. It was pretty great. I was not allowed to work past the six-month mark — it was not considered safe — so we needed to do something, to set up an exit. Given the reality that the twins will be just a few months old by the time we start shooting next year, we weren’t sure what my condition was going to be like, if I come back, all of that, so they needed to do something that would cover their asses…. The one thing I kept stressing was, “Whatever way you choose for her to go, I don’t want my physical inabilities to curtail the character in any way. I want Shaw to go out with the highest level of truth. I want to honor the character and all the different things you guys brought to her. I don’t want to sacrifice any of that stuff because I’m pregnant. There’s a way we can work around the pregnancy and still keep the intention of the character alive,” and I think they did. I was very pleased.

TVLINE | Going back to the kiss: Did Root get a bit inside Shaw’s head, or was the kiss primarily to hush her, so Shaw could get on with saving the day?

I think there are a few reasons for that kiss. One, given Shaw’s “exit,” I think it was earned by the fans — they’ve been pushing for it for enough time, it was time to give them what they wanted. Two, I feel like it as a tactic for Shaw to just get out of the elevator and get done what she needed to do. At that point, she felt she needed to punch [Root] or kiss her, and the easier way to get her off her back was to plant one on her, throw her back into the elevator and shut the door. The third thing, I think, is there’s been a season-and-a-half of some pretty intense flirtation between the two of them, and though Shaw is famous for being guarded with her emotions, I do think that there is some kind of requited love happening – whether or not it’s happening to the extent that Root’s is, I don’t know. But does Shaw have feelings for Root? Absolutely.

TVLINE | And No. 4: “Amy Acker is a stone-cold fox.”

Exactly! [Laughs] That is so No. 4.

TVLINE | What would you put on Shaw’s tombstone? What’s her epitaph?

Another great question. And I want to give a great answer….

TVLINE | “She Died How She Lived — A Badass”?

Maybe “Pull the Trigger. I Dare You”? Or you could say, “She Had a Big Appetite for Violence.” She was such an adrenaline junkie, and she had this issue with violence — it made her happy. One thing I wish we had done with Shaw is gone into the Terminator aspect of her more. We did a little bit last year, but that always intrigued me. The initial character of Shaw really, really attracted me because I saw somebody who was so damaged, and I thought what fun it would be to go in and explore all of that. I mean, talk about therapy! That would be amazing.

Want more scoop on Person of Interest, or for any other show? Email insideline@tvline.com and your question may be answered via Matt’s Inside Line.