Repository navigation
Description
Description
Desktop: file tree shows a stale directory snapshot (Reload does not refresh it)
Environment
- OpenCode Desktop 2.0.32 (Windows 11, packaged build)
- Workspace: an ordinary Git repository (verified with
git status)
Summary
Directories created after the desktop window has been open never appear in the right-side file tree ("Changes" and "All files" tabs), even after triggering Reload (Ctrl+R / View → Reload). Opening a new window (Ctrl+Shift+N) shows the complete tree immediately.
The server data is correct — GET /api/fs/list returns every entry, including the ones missing from the UI.
Steps to reproduce
- Open a workspace in Desktop and leave the window open (in our case: the app ran for ~2 days).
- Create a new top-level directory from a terminal or via agent tools (e.g.
.worktrees/,.idea/,.build/,.cbb/). - Look at the right-side file tree → the new directory does not appear.
- Press Ctrl+R (View → Reload) → still absent.
- Open a new window (Ctrl+Shift+N) → the directory appears immediately.
Evidence
Server sees the entries
GET /api/fs/list?location[directory]=D:\ai-workspace\jsygt-openapi-aiws
children(16):
[directory] .build\
[directory] .cbb\
[directory] .codespace\
[directory] .git\
[directory] .idea\
[directory] .opencode\
[directory] .qoder\
[directory] .workbuddy\
[directory] .worktrees\
[directory] deploy\
[directory] docs\
[directory] openspec\
[file] .gitignore
[file] AGENTS.md
[file] CBB-WORKSPACE.json
[file] README.md
The UI in the already-open window showed only 12 of those 16 entries (missing .build, .cbb, .idea, .worktrees).
Same workspace, two windows
- Old window: missing directories (stale snapshot).
- New window (Ctrl+Shift+N): all directories present.
This isolates the problem to renderer state, not the server or the filesystem.
No workspace filesystem watcher
Server log shows watcher subscribe only for config-ish files, and no filesystem.changed events for workspace content:
timestamp=... message="watcher subscribe" path="...\\AGENTS.md" type=file
timestamp=... message="watcher subscribe" path="...\\.git\\HEAD" type=file
No directory watcher and no filesystem.changed events for the workspace. As a consequence:
- new files/directories are not reflected in the tree;
- (likely related) modified file contents in the Review pane do not auto-refresh either.
Expected
- The file tree should reflect filesystem changes (new/removed directories and files).
- At minimum,
Reload(Ctrl+R) should rebuild the complete tree state instead of keeping a stale snapshot. - Ideally the workspace should be watched so
filesystem.changedevents drive both the file tree and session review.
Notes
- Workaround for users: open a new window (Ctrl+Shift+N) or restart the app.
- Reproduced on Windows; the same workspace tree issue has been observed across multiple workspaces (one workspace created new dirs after the window was opened → hidden; another older workspace with all dirs pre-existing → tree complete).
Plugins
No response
OpenCode version
No response
Steps to reproduce
No response
Screenshot
No response
Operating System
No response
Terminal
No response
Activity
opencode-agent commentedon Oct 19, 2026
Thanks for the detailed report and the
/api/fs/listoutput.There are two parts here:
.git/HEAD, so creating files or folders sends nofilesystem.changedevent. That matches what you saw in your logs. A fix is proposed in fix(core): publish filesystem.changed events for workspace file edits #55540. desktop: file tree does not refresh live; workspace watcher emits no events (Windows) #56615 reported the same thing on 2.0.32/Windows.Two details would help:
fs/listrequest. Does it go out, does it show(disk cache)/(memory cache), and does its response include.build,.cbb,.ideaand.worktrees?\vs/?Until then, opening a new window (Ctrl+Shift+N) works around it, as you found.
tattwamasii2p commentedon Nov 14, 2026
Additional reproduction (Linux) — and a clue: the tree refreshes on tab switch
Environment
opencode --version→v2.0.32, binary at~/.opencode/bin/opencodeTERM=xterm-256color(TERM_PROGRAMunset)/bin/bashlatest).git) — the workspace in the original issue report (this issue thread) was a git repo, so this may be a differentiating factor worth checkingSummary
Same stale file tree on Linux, but with an observation that I think pinpoints the cause: the tree only refreshes when the tab is switched away and back. It never picks up changes while the tab stays active, and no kind of file write makes it update.
Steps to reproduce
writetool (i.e. written by the IDE itself),printf ... > file),file.tmp→os.replace→file),ls -la,stat).+ tab) and switch back to tab A.Actual behavior
No automatic refresh at all — not after seconds, not after minutes, and not on any write method. Only a tab switch (i.e. a component remount) re-reads the directory.
Expected behavior
The file tree should pick up filesystem changes while the tab is active, or at least offer a manual refresh means (button or otherwise) (see #63715).
Why this is useful for the investigation
IN_MOVED_TO/ atomic-rename hypothesis: even files written by OpenCode's ownwritetool are invisible, so the watcher is not missing a specific event mask — it appears to receive no events at all, consistent withworkspace watcher emits no eventsin desktop: file tree does not refresh live; workspace watcher emits no events (Windows) #56615.GET /api/fs/listpresumably returns the right data (the UI simply never re-queries it) — the same conclusion the original report reached from the API side.Workaround found: switch to another tab and back (re-mounts the tree component).
This comment has been posted by Opencode AI agent, a bit edited by human ( @tattwamasii2p ) (Human writes: I didn't verify links to other issues from this report comment, so our mileage may vary --- but other points in this report comment seem to be correct).