You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Critical data loss after consecutive updates (sessions, history, plugins and providers disappeared) #39560
After installing several consecutive updates (around 3 updates within a few hours), OpenCode became unusable.
The issues I encountered are:
All of my existing sessions can no longer be opened.
My entire chat history is gone, including a long-term project that represented weeks of work.
Existing tabs now display:
"This session cannot be found."
The Plugins section disappeared completely.
My MCP list became empty.
No providers are available anymore, so I cannot select any model.
Even the model search returns nothing.
The only remaining option is adding a custom provider manually.
The browser console also shows multiple errors such as:
Cannot read properties of undefined (reading 'temperature')
UnsupportedContentType
HTTP 400 Bad Request
Downgrading from v1.18.9 back to v1.18.0 restores the Providers, MCPs and Plugins, which strongly suggests a regression introduced in recent releases.
Unfortunately, my session history/database appears to have been lost during the update.
Please avoid updates that can silently destroy user data, or at least warn users before performing any database or storage migration.
If your issue is distinct (e.g., the providers/plugins/MCPs also disappearing is a separate regression), please add clarifying details so this can be tracked independently.
Those issues don't look related to me. My team and I have been experiencing the same issue periodically since a recent update. The Opencode desktop app is unusable since it can't load any of our provider\model\MCP information. Please fix.
Here is the writeup Claude provided me after I had it scan the logs...
Confirming this on v1.18.10, Windows 11 Enterprise. Intermittent — crashes ~70% of launches, succeeds on warm starts.
Environment
Desktop v1.18.10, Windows 11 Enterprise 10.0.26100
Custom providers via @ai-sdk/openai-compatible (no built-in API keys)
Issue started after updating from ~v1.18.5 on Monday July 28
Symptoms
Renderer: Failed to finish bootstrap instance TypeError: Cannot read properties of undefined (reading 'temperature')
Toast: "Failed to reload [ProjectName] — UnsupportedContentType"
Toast: "Failed to reload [ProjectName] — Cannot read properties of undefined (reading 'temperature')"
Provider list empty, MCP list empty, model selector shows nothing
Root Cause: Race Condition
The desktop signals server ready when the sidecar HTTP listener opens, but the renderer queries providers before the model catalog is fully populated. Across 41 sessions I can reproduce a perfect correlation between updater-check duration (proxy for cold-start slowness) and the crash:
SESSION spawn→ready updater_dur RESULT
20260731T124118 3.2s 23.1s CRASH (renderer crashes 32.8s after ready)
20260731T125545 1.6s 1.8s clean
20260731T132328 2.2s 2.2s clean
20260731T132215 1.6s 21.8s CRASH
20260730T203640 2.4s 1.9s clean
20260730T202202 2.8s 22.1s CRASH
Pattern: every session where updater check takes >10s → CRASH. Every session where it completes in <3s → clean. The updater duration isn't the cause — it's a marker for cold-start conditions where the sidecar registry population takes longer than the renderer's bootstrap timeout.
Renderer logs (crash sessions)
[2026-07-31 08:41:55.871] [error] Failed to finish bootstrap instance TypeError: Cannot read properties of undefined (reading 'temperature')
[2026-07-31 08:30:51.103] [error] Failed to finish bootstrap instance TypeError: Cannot read properties of undefined (reading 'temperature')
[2026-07-29 17:15:46.086] [error] Failed to finish bootstrap instance TypeError: Cannot read properties of undefined (reading 'temperature')
Sidecar log (no errors during crash — provider catalog just not ready yet)
timestamp=2026-07-31T12:41:41.058Z level=INFO message=loading path="...opencode.jsonc"
timestamp=2026-07-31T12:41:44.176Z level=INFO message=bootstrapping directory="...WinISO-Builder"
timestamp=2026-07-31T12:41:44.229Z level=INFO message=init
Config loads at :41.058, but init doesn't complete until :44.229 — 3.2s after config load. Renderer crashes at :55.871 — 32.8s after server ready. The renderer queried providers during the initialization window and got an empty/partial map.
What I tried (none fix the issue)
OPENCODE_DISABLE_MODELS_FETCH=1 — providers disappear entirely (models.dev catalog is required for custom provider registration)
OPENCODE_DISABLE_AUTOUPDATE=1 — sidecar fails to start at all
autoupdate: false in opencode.jsonc — no effect on desktop updater (separate electron-updater)
Relaunching repeatedly — eventually hits a warm start and succeeds
Suggested fix
The loading guard added in PR #39445 is incomplete. The TanStack Query isLoading flag reflects HTTP request state, not sidecar catalog readiness. If the sidecar returns successfully but with an empty/partial provider list (because the catalog hasn't finished building), the query resolves "loaded" and the renderer accesses undefined model entries. The guard should check that the provider map is non-empty and contains the persisted model selection before attempting to read model properties like temperature.
Activity
github-actions commentedon Jul 29, 2026
This issue might be a duplicate of existing issues. Please check:
If your issue is distinct (e.g., the providers/plugins/MCPs also disappearing is a separate regression), please add clarifying details so this can be tracked independently.
ssc-esiemiat commentedon Jul 31, 2026
Those issues don't look related to me. My team and I have been experiencing the same issue periodically since a recent update. The Opencode desktop app is unusable since it can't load any of our provider\model\MCP information. Please fix.
Here is the writeup Claude provided me after I had it scan the logs...
Confirming this on v1.18.10, Windows 11 Enterprise. Intermittent — crashes ~70% of launches, succeeds on warm starts.
Environment
Desktop v1.18.10, Windows 11 Enterprise 10.0.26100
Custom providers via @ai-sdk/openai-compatible (no built-in API keys)
Issue started after updating from ~v1.18.5 on Monday July 28
Symptoms
Renderer: Failed to finish bootstrap instance TypeError: Cannot read properties of undefined (reading 'temperature')
Toast: "Failed to reload [ProjectName] — UnsupportedContentType"
Toast: "Failed to reload [ProjectName] — Cannot read properties of undefined (reading 'temperature')"
Provider list empty, MCP list empty, model selector shows nothing
Root Cause: Race Condition
The desktop signals server ready when the sidecar HTTP listener opens, but the renderer queries providers before the model catalog is fully populated. Across 41 sessions I can reproduce a perfect correlation between updater-check duration (proxy for cold-start slowness) and the crash:
SESSION spawn→ready updater_dur RESULT
20260731T124118 3.2s 23.1s CRASH (renderer crashes 32.8s after ready)
20260731T125545 1.6s 1.8s clean
20260731T132328 2.2s 2.2s clean
20260731T132215 1.6s 21.8s CRASH
20260730T203640 2.4s 1.9s clean
20260730T202202 2.8s 22.1s CRASH
Pattern: every session where updater check takes >10s → CRASH. Every session where it completes in <3s → clean. The updater duration isn't the cause — it's a marker for cold-start conditions where the sidecar registry population takes longer than the renderer's bootstrap timeout.
Renderer logs (crash sessions)
[2026-07-31 08:41:55.871] [error] Failed to finish bootstrap instance TypeError: Cannot read properties of undefined (reading 'temperature')
[2026-07-31 08:30:51.103] [error] Failed to finish bootstrap instance TypeError: Cannot read properties of undefined (reading 'temperature')
[2026-07-29 17:15:46.086] [error] Failed to finish bootstrap instance TypeError: Cannot read properties of undefined (reading 'temperature')
Sidecar log (no errors during crash — provider catalog just not ready yet)
timestamp=2026-07-31T12:41:41.058Z level=INFO message=loading path="...opencode.jsonc"
timestamp=2026-07-31T12:41:44.176Z level=INFO message=bootstrapping directory="...WinISO-Builder"
timestamp=2026-07-31T12:41:44.229Z level=INFO message=init
Config loads at :41.058, but init doesn't complete until :44.229 — 3.2s after config load. Renderer crashes at :55.871 — 32.8s after server ready. The renderer queried providers during the initialization window and got an empty/partial map.
What I tried (none fix the issue)
OPENCODE_DISABLE_MODELS_FETCH=1 — providers disappear entirely (models.dev catalog is required for custom provider registration)
OPENCODE_DISABLE_AUTOUPDATE=1 — sidecar fails to start at all
autoupdate: false in opencode.jsonc — no effect on desktop updater (separate electron-updater)
Relaunching repeatedly — eventually hits a warm start and succeeds
Suggested fix
The loading guard added in PR #39445 is incomplete. The TanStack Query isLoading flag reflects HTTP request state, not sidecar catalog readiness. If the sidecar returns successfully but with an empty/partial provider list (because the catalog hasn't finished building), the query resolves "loaded" and the renderer accesses undefined model entries. The guard should check that the provider map is non-empty and contains the persisted model selection before attempting to read model properties like temperature.
ssc-esiemiat commentedon Jul 31, 2026
Downgrading back to 1.18.0 appears to have fixed the issue.
ssc-esiemiat commentedon Aug 3, 2026
My team and I can't upgrade Opencode Desktop until this issue is addressed. The application is unusable on most launches due to this bug.
github-actions commentedon Oct 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.