Skip to content

Critical data loss after consecutive updates (sessions, history, plugins and providers disappeared) #39560

Closed as not planned

Description

@repair115

Description

Hello.

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

Image

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.

Thank you.

Plugins

opencode-mem , lm-studio

OpenCode version

1.18.9

Steps to reproduce

No response

Screenshot and/or share link

Image

Operating System

windows 11, Ubuntu 26.0.4, Debian 13.5

Terminal

PowerShell, Bash

Activity

  1. github-actions commented on Jul 29, 2026

    @github-actions
    Contributor

    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.

  2. ssc-esiemiat commented on Jul 31, 2026

    @ssc-esiemiat

    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.

  3. ssc-esiemiat commented on Jul 31, 2026

    @ssc-esiemiat

    Downgrading back to 1.18.0 appears to have fixed the issue.

  4. ssc-esiemiat commented on Aug 3, 2026

    @ssc-esiemiat

    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.

  5. github-actions commented on Oct 3, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions