desktop: automatically created default project is not restored on restart · Issue #57777 · anomalyco/opencode · GitHub
Skip to content

desktop: automatically created default project is not restored on restart #57777

Open

Description

@pupa-jupa

Description

If Desktop's automatically created default-project directory disappears, reopening Desktop leaves the composer without a model picker. Requests to /api/model, /api/provider and /api/location for that directory return 404 LocationNotFoundError. Recreating the directory immediately restores the catalogs.

finishFirstLaunchOnboarding creates the directory once, then only firstLaunchOnboardingComplete is persisted. Later starts skip creation and do not remember which directory Desktop itself created. Desktop could restore its own default directory if it recorded that identity, without recreating arbitrary user-selected projects.

Related: #50951. The closed, unmerged #50952 offered unavailable-project UI rather than remembering and restoring this managed directory.

Plugins

Not required to reproduce.

OpenCode version

2.1.2

Steps to reproduce

  1. Start Desktop with a fresh profile and let it create the default project.
  2. Quit Desktop and stop the background server with opencode service stop.
  3. Rename the automatically created default-project folder under Documents.
  4. Reopen Desktop. The model picker is absent and the location-scoped catalog requests return 404.
  5. Recreate the original folder and reload Desktop; the models return.

Screenshot

No screenshot attached; the failure is the missing model picker and the typed 404 responses above.

Operating System

Windows, Electron desktop app.

Terminal

Desktop. The CLI works when launched in an existing directory.

Activity

  1. opencode-agent commented on Oct 21, 2026

    @opencode-agent
    Contributor

    Thanks for the clear write-up and the pointer to the onboarding code.

    If I understand right, you're asking Desktop to remember which default-project folder it created during first-launch onboarding, and to recreate that folder (only that one, not folders you picked yourself) when it goes missing. Today finishFirstLaunchOnboarding creates the folder once and saves only firstLaunchOnboardingComplete, so Desktop works as built here. That's why I've filed this as a feature request rather than a bug. The maintainers will consider it.

    Related issues:

    Until then, the workaround you found still works: recreate the folder at its original path and reload Desktop.

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

Metadata

Metadata

Assignees

No one assigned

    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