My cat did the same threshold thing for a couple of weeks before going inside, briefly at first, then overnight. Every few days now, he still goes outside at night for an hour or so, but otherwise he is an indoor cat who stays close to me. At the moment, he is sitting between me and my desktop computer, jealous of the attention that I give the keyboard. That is quite a change for a yard cat that used to flee into the bushes if I looked his way.
Having grown up with dogs, I am still learning cat. We still have some strays, but they keep a much lower profile. We had a few skunks going after leftovers, so I’m not going to just leave food out.