Skip to content

Desktop beta stops showing sessions until UI state files are cleared #28477

Closed as not planned

Description

@jurkech

Describe the bug

On Debian Linux, OpenCode Desktop beta stopped showing previously persisted sessions in the GUI, even though the CLI could still see them perfectly.

The actual session storage (~/.local/share/opencode/project/*/storage) was completely intact.

The issue was resolved by clearing the Desktop cached state files:

  • ~/.config/ai.opencode.desktop/opencode.global.dat
  • ~/.config/ai.opencode.desktop/opencode.workspace.*.dat

Once those were removed and the Desktop app restarted, it rebuilt the index and the sessions appeared again.

Steps to reproduce

This may have been triggered by opening the workspace through a symlink vs its realpath, or just a stale desktop cache over time.

Expected behavior

Desktop GUI should correctly sync/read the session storage, or auto-recover if the .dat cache gets out of sync with actual storage.

Environment

  • OS: Debian Linux
  • App: OpenCode Desktop (Beta)

Activity

  1. github-actions commented on May 20, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    If your issue is distinct from those (e.g., specific to a symlink vs. realpath triggering the desync), please add details clarifying the difference.

  2. Keesan12 commented on May 20, 2026

    @Keesan12

    When clearing UI state files fixes missing sessions, that usually means the source of truth and the view cache disagree about ownership or versioning.

    I would look for a cache schema/version receipt on startup: discovered sessions, cached session index version, migration result, and why any entry was filtered. Otherwise users only learn that "deleting state works," not which persistence boundary actually broke.

  3. jurkech commented on May 20, 2026

    @jurkech
    Author

    I can confirm this was not a storage failure.

    CLI could still see all sessions, including sessions originally created in Desktop. Clearing only the Desktop UI/cache state restored visibility immediately:

    • ~/.config/ai.opencode.desktop/opencode.global.dat
    • ~/.config/ai.opencode.desktop/opencode.workspace.*.dat

    After removing those files and restarting Desktop, the session list reappeared.

    I also checked the symlink angle more closely. My repo is available through both:

    • /home/roman/archive/work/tests/erm-playwright-tests
    • /home/roman/work/tests/erm-playwright-tests

    CLI showed the same sessions from both paths, so core project/session storage seems to be resolving that correctly. That makes me think the main failure is in Desktop cache/state restoration or session-list indexing, not in the underlying session persistence itself.

    So symlink vs realpath may still be a trigger, but it does not look like the root storage identity problem in my case.

  4. Keesan12 commented on May 21, 2026

    @Keesan12

    That extra detail helps a lot because it narrows the fault line to Desktop cache/index restoration instead of core session storage. The next receipt I would want on startup is: discovered sessions from source, cache index entries loaded, canonical workspace identity chosen, and filter reason for every hidden entry. Once those four numbers exist, you can usually tell in one boot whether the problem is stale cache, path canonicalization, or a bad migration instead of asking users to delete state files blindly.

  5. Keesan12 commented on May 22, 2026

    @Keesan12

    A desktop-state receipt here would be more useful than deeper speculation: cache/index path, expected version, actual version, whether rebuild was attempted, and what made the app trust or reject the local state. That gives people a clean triage branch before they start deleting files blindly.

  6. github-actions commented on Jul 22, 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