Skip to content

[Bug]: Desktop auto-update discards window tab layout (new window ID, old window state orphaned) #46938

Description

@deviceargent

Description

After the Desktop app auto-updated to v1.18.27, the relaunched window started with no tabs. It looks like the user's work was lost, but the underlying sessions are fine in the session DB — only the window layout was discarded.

Root cause (from local forensics on Windows):

  • Window/tab layout is persisted per window ID under %APPDATA%\ai.opencode.desktop\opencode.window.<uuid>.dat.
  • opencode.settings keeps "windowIds": [...]. After the update it contains only the new window UUID (c9813610-…); the pre-update window (7de85670-…) was dropped from the list even though its .dat file still exists on disk with all the previous tabs (tabs, tabs.recent, tabs.info, tabs.closed).
  • The new window was created empty and got its own .dat, so the old tabs are never restored.

So the update flow appears to re-register a fresh window ID instead of reusing the existing one, orphaning the previous window state. For anyone running multiple tabs across projects this is scary — it looks like data loss.

Steps to reproduce

  1. Open the Desktop app (pre-1.18.27) with several session tabs open (e.g. work in C:\Users\...\Default Project).
  2. Let it auto-update to 1.18.27 and relaunch.
  3. The relaunched window has a single empty tab; previous tabs are gone from the UI.

Expected behavior

After an auto-update, the window should restore the previous window ID (or migrate it), so tabs from the pre-update window are restored. Sessions live in the server DB, so at minimum the tab layout should survive an update.

Actual behavior

New window UUID is registered, previous window is dropped from windowIds, relaunched window starts with no tabs. The old .dat remains on disk but is never read again.

Workaround

The sessions are still in the session DB and can be reopened from the session picker; the old layout is still recoverable from the orphaned opencode.window.<old-uuid>.dat file.

OpenCode version

1.18.27 (Desktop, Windows 10)

Operating System

Windows (win32)

Activity

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