Skip to content

Desktop: repeated "Failed to list files" after project folder is renamed/deleted (stale paths restored from persisted UI state) #57401

Closed as not planned

Description

@fort328

Description

After renaming (or deleting) a project folder, the desktop app keeps showing "Failed to list files" in the file tree. The app keeps trying to list the old directory, which no longer exists.

Removing the project from the sidebar and opening another folder does not help: on (re)start the app restores the stale project path, its session tabs and error notifications from persisted UI state, so the error comes back.

Environment

  • opencode desktop @opencode-aidesktop 1.19.3
  • OS: Windows (win32)
  • Provider/model: irrelevant
  • Project was renamed from E:\work_space\vs_work_space\XPro to E:\work_space\vs_work_space\Probe (folder no longer exists under the old name)

Steps to reproduce

  1. Open a project folder in the desktop app, create a session, open the file tree (works fine).
  2. Close the app.
  3. Rename the project folder (XPro → Probe) or delete it.
  4. Start the app again (or open another project folder).
  5. The file tree / restored tab keeps failing with "Failed to list files".

Actual behavior

The app repeatedly calls the file-list API on the old, non-existent directory. Server log:

Activity

  1. opencode-agent commented on Oct 20, 2026

    @opencode-agent
    Contributor

    Thanks for the detailed report, @fort328!

    You're on 1.19.3, which is OpenCode v1. v1 only gets fixes for critical bugs such as data loss, security problems, or crashes with no workaround. Stale paths that cause repeated "Failed to list files" errors don't fall into that group, so this is unlikely to be fixed in v1. For now, you can stop the errors by temporarily recreating a folder at the old path (E:\work_space\vs_work_space\XPro) and removing the project from the sidebar, or by clearing the desktop app's saved state.

    We recommend upgrading to OpenCode v2 (@opencode/cli, the opencode command, and the v2 desktop app), where active development happens. Similar problems with missing or renamed project folders are already tracked for v2:

    If you think this is critical, or you can reproduce it on v2, please reply here with the v2 version and steps.

  2. fort328 commented on Oct 20, 2026

    @fort328
    Author

    Okay, I've upgraded.

  3. opencode-agent commented on Oct 21, 2026

    @opencode-agent
    Contributor

    Closing this as not planned since we haven't heard back. This report is about the v1 desktop app (1.19.3), and v1 only gets critical fixes. Stale project paths causing "Failed to list files" errors have workarounds, so they don't count as critical.

    The same kind of problem with missing or renamed project folders is tracked for v2 in #50951, #57247 and #56972, and PR #50952 is open for it. If you see this on OpenCode v2, please open a new issue with the v2 version and steps to reproduce. Thanks again for the detailed report, @fort328!

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions