GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — desktop: Open File tree keeps deleted directories after panel reopen and window reload · Issue #64858 · anomalyco/opencode

desktop: Open File tree keeps deleted directories after panel reopen and window reload #64858

New issue
Copy link
New issue
Copy link
Closed as duplicate
Closed as duplicate
desktop: Open File tree keeps deleted directories after panel reopen and window reload#64858
Copy link
Labels
area/desktopDesktop appplatform/linuxLinuxtype/bugSomething is brokenversion/v2OpenCode 2.x

Description

@lgLindstrom
lgLindstrom
opened on Nov 19, 2026
Issue body actions

Summary

In the desktop app, the Open File tree keeps showing directories that no
longer exist on disk. After a tracked directory is removed from the worktree
(e.g. by an agent running git mv/rmdir in its shell), the tree still lists
it, and neither closing/reopening the panel nor reloading the window clears it.
The server's filesystem APIs return the correct, current listing.

Environment

  • opencode version: desktop app 2.3.0 (bundled CLI 2.3.0); system CLI v2.2.7
  • OS: Linux 7.0.0-43-generic x86_64 (Ubuntu 26.04.1 LTS)
  • Terminal: not applicable (desktop app)
  • Shell: /bin/bash
  • Install/channel: release (.deb, /opt/OpenCode)
  • Active plugins: opencode-file-editor 0.5.2 (global), @dietrichgebert/ponytail (project)

Reproduction

  1. Open a git repository as the session directory, e.g. ~/projects/psmu.
  2. Remove a tracked directory from the worktree while the app is running, the
    way an agent does it: git mv firmware/README.md README.md && rmdir firmware
    (the directory is gone from disk and from git ls-files).
  3. Open the top-right panel and choose Open File.
  4. The tree still lists firmware/.
  5. Close and reopen the panel, then reload the window (Ctrl+R). It still lists
    firmware/.

Expected Behavior

The Open File tree reflects the current working tree: a directory that no longer
exists is not listed.

Actual Behavior

The stale firmware/ entry persists across panel reopen and window reload.
The same panel also kept showing file content from the previous git branch after
the agent merged the branch and switched back to main, which points at the
same missing invalidation.

Additional Context

The server side is correct. With the same session active:

opencode api get "/api/fs/list?path=$HOME/projects/psmu"
# data: [.codegraph/, .git/, .github/, .opencode/, build/, components/, docs/,
#        main/, managed_components/, scripts/, ...]   <- no firmware/

opencode api get "/api/fs/find?query=firmware"
# only matches under ~/esp/esp-idf-*, nothing under ~/projects/psmu

find ~/projects/psmu -maxdepth 3 -name 'firmware*'   # nothing
git -C ~/projects/psmu ls-files | grep '^firmware'   # nothing

So /api/fs/list and /api/fs/find are fresh; the stale state is client-side.

Notes that may narrow it down:

  • The Open File tree is rendered by the opencode-file-editor plugin, but it
    only reads the host model (props.file.tree.list(path),
    props.file.tree.expand(path)), so the cached listing lives in core's file
    tree model rather than in the plugin.
  • /api/experimental/fs/watch watches one file for 24 hours and publishes
    filesystem.changed. A directory listing that is invalidated only by those
    events will never hear about a directory being removed or renamed elsewhere.
  • A window reload does not appear to refetch the listing, so the cache may
    survive renderer reloads.

Workarounds tried: reopening the panel (no effect), reloading the window (no
effect). A full app restart was not tried.

Activity

  1. opencodejr commented on Nov 19, 2026

    @opencodejr
    opencodejrBot
    on Nov 19, 2026
    Contributor
    More actions

    Thanks for the detailed report and for checking /api/fs/list and /api/fs/find on the server.

    I think this is a duplicate of #52941. That issue is about the desktop file tree and the Open File browser not picking up changes made outside the tree. One comment there has almost the same steps as yours: a path moved with git mv stays in the Open file tree, Ctrl+R / View → Reload doesn't fix it, and restarting the app does.

    Possible duplicates and related issues, ordered by likelihood:

    • desktop: file tree and preview pane show stale file contents after agent edits #52941: the tree and preview don't refresh after files are created, edited, moved or deleted. Same cause, and it includes your git mv plus reload case.
    • Desktop: file tree shows a stale directory snapshot (Reload does not refresh it) #57099: the tree is still stale after Ctrl+R, while a new window (Ctrl+Shift+N) shows the right tree.
    • [FEATURE]: Add a manual Refresh action to the file tree #63715: a request for a manual Refresh action for the file tree.

    I'm closing this issue now as a duplicate of #52941. Please add your details there, in particular the version (2.3.0), the stale file content after the branch switch, and the fact that the window reload didn't help. If you think this is a different problem, reply here and this issue will reopen.

  2. opencodejr
    closed this as a duplicateof desktop: file tree and preview pane show stale file contents after agent edits #52941 on Nov 19, 2026
  3. opencodejr
    added
    area/desktopDesktop app
    platform/linuxLinux
    type/bugSomething is broken
    version/v2OpenCode 2.x
    on Nov 19, 2026
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

    area/desktopDesktop appplatform/linuxLinuxtype/bugSomething is brokenversion/v2OpenCode 2.x

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.