They drew the line at getting high in the same room as their three-year-old son.

Never went that far, no. Anastasia and James Burke ensured that Liam was away from the needles, the fentanyl, their friends — if they could use that term, “friends,” for the people they’d crash with when they were using, all holed away in the same “trap house.”

It wasn’t just one wrong decision, of course — but the same decision, repeated in a cycle. Until this summer, when the couple decided to quit.

In June, Anastasia had James drop her and Liam off at a rehab clinic. Six days later, James checked himself into a treatment center, too.

When their programs ended in August, they weren’t sure where to go. Both had attempted sobriety before and know how precarious it can be.

Anastasia’s recovery counselors put her and James in touch with Shelter Inc., a nonprofit that runs several homeless shelters around the Bay Area. Shelter Inc. offered the Burkes a private room at the 32-bed Martinez family shelter, where they could stay with Liam and chart out a path forward.

The Burkes moved into the shelter in August. The days are full — breakfast, chores, daycare for Liam and support groups for the adults, homework, dinner. So far, both James and Anastasia have managed to stay the course.

This October, both James and Anastasia marked 100 days of sobriety, an accomplishment they say wouldn’t have been possible without the stability offered by Shelter Inc.

“I’m just grateful for places like this, because when we were out there, we couldn’t do it,” James said. “We didn’t have nowhere to go, we didn’t have no money, no feet to stand on. And it’s hard when it’s like that, especially when you got a little kid that you’re trying to feed with no money. … but I’m just really grateful I’m not in that dark place anymore.”