I have reproduced the issue on the latest CLI version.
Yes, I am on the latest version
I have searched existing posts and this report is not a duplicate.
Yes, this isn’t a duplicate
In which of these areas are you experiencing a problem?
Theme
Expected behavior
127.0.0.1:9292 shows the Development Theme.
Actual behavior
Get an error in the Terminal and the Session gets terminated
Reproduction steps
Run shopify theme dev
Open 127.0.0.1:9292 locally
Get the error in the Terminal
Verbose output
│ Theme ID mismatch: expected 155700232341 but got 152271814805. │
│ Request ID: 4f3524c1-6cf5-4c85-9635-05f3e455a46d-1776515572 │
│ URL: │
│ This is likely related to an issue in upstream Shopify APIs. │
│ Please try again in a few minutes and report this issue: │
│ https://community.shopify.dev/c/shopify-cli-libraries/14
Bug report: Theme ID mismatch — CLI crashes when storefront renderer ignores preview_theme_id on internal render request
Expected behavior
shopify theme dev should stay connected to the development theme and not crash.
Actual behavior
The CLI starts correctly and serves the development theme via ?preview_theme_id=DEV_THEME_ID, but then makes a second internal render request to /?_fd=0&pb=0without the preview_theme_id parameter. The storefront responds with the live theme ID in the server-timing header, causing the CLI to detect a mismatch and crash — even though the original HEAD request with preview_theme_id returned the correct theme.
The CLI retries the session refresh 3 times before throwing the error, but the result is always the same.
Reproduction steps
Have a store with a published (live) theme and a separate development theme
Run shopify theme dev -e development with a shopify.theme.toml specifying the development theme ID
Open http://127.0.0.1:9292 in the browser
After ~5–6 successful requests, the CLI crashes with the mismatch error
Verbose log (key section)
Sending HEAD request to URL https://[STORE].myshopify.com/?preview_theme_id=[DEV_THEME_ID]&_fd=0&pb=0
Request completed with response headers:
server-timing: theme;desc="[DEV_THEME_ID]" ← ✅ correct
→ Rendering https://[STORE].myshopify.com/?_fd=0&pb=0... ← ❌ missing preview_theme_id
← 200
Theme ID mismatch: expected [DEV_THEME_ID] but got [LIVE_THEME_ID]; refreshing session...
The HEAD request with preview_theme_id correctly returns the dev theme in server-timing. The mismatch comes from the subsequent render request which omits preview_theme_id and the storefront falls back to serving the live theme.
Environment
Shopify CLI version: 3.93.2
OS: macOS
Node version: v22.x
Shell: zsh
Workaround
Using the preview URL directly (https://[STORE].myshopify.com/?preview_theme_id=[DEV_THEME_ID]) instead of http://127.0.0.1:9292 avoids the crash, but this is not a sustainable workflow.
This appears to be a server-side issue where the storefront renderer does not carry the preview_theme_id context between the HEAD validation request and the actual render request.
Not a dev by any means, so I’m probably not able to give to many detailed technical infos but still wanted to add that I’m having the same issue since yesterday.
I’m on version 3.94.3 but tried on a bunch of older versions as well with the same result. It randomly started during a session and after that I wasn’t able to load the preview a single time. “shopify theme dev“ connects correctly at first but when then trying to load 127.0.0.1:9292 it fails with the “theme id mismatch” error.
Despite my limited technical knowledge I can confirm that the theme id it’s getting according to the error message is the id of my live theme instead of my dev theme.
I tried this as well multiple times but for me it only helps temporarily. After a logout and re-login I can load the preview but after a few page changes the problem returns.
Hi Not sure yet what caused this issue but could you try this version of the CLI and let us know if it improves the situation? @shopify/cli@0.0.0-snapshot-20260508082501