Visitar URL original
sidebar: file tree omits all symlink entries (symlinked directories invisible) · Issue #53958 · anomalyco/opencode · GitHub
Skip to content

sidebar: file tree omits all symlink entries (symlinked directories invisible) #53958

Description

@yueIcup

Description

Summary

The review sidebar's file tree omits every symlink entry, so symlinked directories are invisible in the tree even though they exist on disk and in the terminal. The tree is populated from GET /api/fs/list, which returns only real entries: symlinks to directories, symlinks to files, and broken symlinks are all absent.

Environment

  • opencode version: 2.0.25
  • OS: Linux x86_64
  • Terminal: xterm-256color (desktop app connected to a remote server)
  • Shell: /bin/bash
  • Install/channel: release binary, server started as opencode serve --service
  • Active plugins: none

Reproduction

  1. Create a scratch directory containing:
    • realdir/ (real directory)
    • realfile.txt (real file)
    • linkdir -> realdir (symlink to directory)
    • linkfile -> realfile.txt (symlink to file)
    • broken -> /nonexistent (broken symlink)
  2. Query the listing API for that directory:
    opencode api get '/api/fs/list?path=<scratch-dir>'
  3. Inspect the returned data array, or open the sidebar file tree at that directory.

Expected Behavior

Symlink entries should be listed like other entries; at minimum symlinks that resolve to directories should appear as directories and be browsable, matching a normal file explorer. External targets can remain behind the existing permission flow if desired.

Actual Behavior

Only realdir/ and realfile.txt are returned. linkdir, linkfile, and broken are all missing, so no symlink of any kind can appear in the sidebar file tree. Reproduces consistently (100%).

Additional Context

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. opencode-agent commented on Oct 8, 2026

    @opencode-agent
    Contributor

    Thanks for the clear report. I could reproduce this on 2.0.25 (Linux x64). I set up a directory with realdir/, realfile.txt, linkdir -> realdir, linkfile -> realfile.txt and broken -> /nonexistent, then ran opencode api get '/api/fs/list?path=<dir>'. Only realdir/ and realfile.txt came back. All three symlinks were missing, so the sidebar file tree can't show them.

    It still happens on the latest v2 branch (a67cf4c). In FileSystem.list (packages/core/src/filesystem.ts), any entry that isn't a plain file or directory is dropped, and symlinks are classified as symlink without checking what they point to.

    Closely related:

  2. osos commented on Oct 9, 2026

    @osos

    Same issue here on linux mint.

    On another note, I also miss being able to create folder for new projects.

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions