Robert Voets/CBS

WARNING: This article contains spoilers forMatlockseason 1, episode 15, “Game Face.”

Madeline Matlock has finally met her favorite Redditor.

ENTERTAINMENT WEEKLY: How early in the writing process did you settle on the identity of the whistleblower?

MATLOCK Leah Lewis as Sarah Franklin and Kathy Bates as Madeline Matloc

Leah Lewis and Kathy Bates on ‘Matlock’.Credit:Robert Voets/CBS

So that was part of our initial arc-breaking at the beginning of the season.

At what point did Patricia learn that she was the whistleblower?

Has she been playing all of her episodes with that knowledge?

MATLOCK Patricia Belcher

Patricia Belcher on ‘Matlock’.Robert Voets/CBS

No, she played very officious and detail-oriented and rule-following until she got this week’s script.

What was her reaction to finding out that she’s the whistleblower?

She was really excited she changed some flight plans for us and pushed some scheduled vacations.

MATLOCK Leah Lewis as Sarah Franklin and Kathy Bates as Madeline Matloc

Kathy Bates on ‘Matlock’.Robert Voets/CBS

She pushed and pulled so she could be there to do this arc for us.

So I’m assuming since Patricia didn’t know, the rest of the cast didn’t know either?

No, it was a surprise to them.

We were definitely building up Shea as the red herring there.

But you will find out why she said “One of those three people.”

And Matty will make contact with her.

I’m smiling because it’s fun, the way she does it.

Something specific about her.

So then that was always part of her character.

So it was part of building the specificity of her character when Barry Manilow came up.

Did you play around with any other musicians that that could have been?

The idea just came as Barry Manilow.

Is there a Barry Manilow fan in the writer’s room?

I grew up with my mom playing Barry, so I definitely knew all those songs.

I would be the one that would be like, “Is it too obvious?

The strains of music hinting at where we’re going?”

But in the writer’s room, they would say, “No, it’s not too obvious.

We don’t have our finger on that musical pulse.”

Matlockairs new episodes Thursdays at 9 p.m. ET/PT on CBS.

This interview has been edited for clarity and length.