Continuously being logged out and having to re-auth

Hey everyone,

Even I’ve been running into a recurring issue with the Shopify CLI where it keeps asking me to re-authenticate. This happens with both shopify theme dev and shopify app dev. I’m seeing this behavior only after the recent CLI update.

A few things I’ve noticed:

• If I keep the CLI running and step away for an hour or so, when I return and make a change, it forces a re-authentication.
• The next day, even if I authenticated the previous day, running shopify app dev or shopify theme dev always asks for login again.
• When there’s a bug code error, I often get this message:

And when I run:

npm run test-store
shopify theme dev --store store-name-test

I get prompted with a user verification code and need to go through the browser login again.

I have two-factor authentication enabled, so repeating the login flow multiple times a day becomes a bit painful but recently started using Sign In with Passkey which saves a lot of time but still it’s a process in the end. This never used to happen before the recent update, so I’m not sure if this is expected behavior.

My CLI shopify version: 3.84.2