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 — Symlinked directories not visible in project picker (opencode serve) · Issue #10365 · anomalyco/opencode

Symlinked directories not visible in project picker (opencode serve) #10365

New issue
Copy link
New issue
Copy link
Closed
Closed
Symlinked directories not visible in project picker (opencode serve)#10365
Copy link
Assignees
rekram1-node
Labels
bugSomething isn't workingwebRelates to opencode on web / desktop

Description

@frizikk
frizikk
opened on Jan 24, 2026
Issue body actions

Description

Description

Symlinked directories are not visible in the project picker when running opencode serve.

Steps to Reproduce

  1. Create a symlink to a directory:
    ln -s /mnt/data/Projects ~/Projects
  2. Run opencode serve
  3. Open web UI and use project picker
  4. Navigate to ~/Projects
    Expected: Symlinked subdirectories appear as directories
    Actual: They are hidden or shown as files

Root Cause

fs.readdir() with withFileTypes: true returns entry.isDirectory() = false for symlinks, even when pointing to directories.
Affected code in packages/opencode/src/file/index.ts:

  • File.list() - directory listing API
  • Home directory scanning

Environment

  • OS: Linux
  • OpenCode: latest

Plugins

No response

OpenCode version

1.1.34

Steps to reproduce

  1. Create a symlink to a projects directory:
    ln -s /mnt/data/Projects ~/Projects
  2. Start the server:
    opencode serve
    3. Open web UI in browser
  3. Open project picker dialog
  4. Navigate to ~/Projects

Screenshot and/or share link

No response

Operating System

CachyOS Linux (arch btw)

Terminal

Ghostty

Reacted by _WD_, Jeroen Evens, Ivan Pantic, Shu Takahashi and Marek Příhoda

Activity

  1. frizikk
    added
    bugSomething isn't working
    on Jan 24, 2026
  2. github-actions
    assigned
    rekram1-node
    on Jan 24, 2026
  3. github-actions
    added
    webRelates to opencode on web / desktop
    on Jan 24, 2026
  4. github-actions commented on Jan 24, 2026

    @github-actions
    github-actionsBot
    on Jan 24, 2026 – with GitHub Actions
    Contributor
    More actions

    This issue might be a duplicate of existing issues. Please check:

    • Path traversal vulnerability via symlinks and cross-drive paths #8313: Path traversal vulnerability via symlinks and cross-drive paths - related to symlink handling in src/file/index.ts
    • Grep Tool Fails on Symlinks #7498: Grep Tool Fails on Symlinks - similar symlink visibility and handling issues in the filesystem API
    • ripgrep causes Grep tool to fail in the presence of broken symlinks #8307: ripgrep causes Grep tool to fail in the presence of broken symlinks - also related to symlink handling
    • Grep tool returns only error messages if directory has invalid symlinks, despite valid outputs #8616: Grep tool returns only error messages if directory has invalid symlinks - symlink-related directory traversal issues
    • Web frontend "open project" on Windows only lists user folder and fails for absolute/relative paths #7597: Web frontend "open project" on Windows only lists user folder and fails for absolute/relative paths - related project picker visibility issue in web mode

    Feel free to ignore if none of these address your specific case.

  5. jeroenev commented on Feb 6, 2026

    @jeroenev
    jeroenev
    on Feb 6, 2026
    More actions

    They are also not visible in ripgrep (search tool) and cannot be @tagged in opencode

  6. panta82 commented on Feb 7, 2026

    @panta82
    panta82
    on Feb 7, 2026
    Contributor
    More actions

    Just got hit by this. My clanker analyzed and wrote this:

    This is a regression introduced in commit c0e71c4 (PR #11415 — "fix: don't --follow by default for grep and other things using ripgrep").

    The change in packages/opencode/src/file/ripgrep.ts flipped the default for --follow from opt-out to opt-in:

    • if (input.follow !== false) args.push("--follow")
    • if (input.follow) args.push("--follow")

    This was applied to both Ripgrep.files() and Ripgrep.search(). The intent was to stop grep from following symlinks by default, but it also broke the file indexer which never passes follow explicitly.

    The file indexer at packages/opencode/src/file/index.ts:170 calls:
    for await (const file of Ripgrep.files({ cwd: Instance.directory })) {

    Since follow is undefined, the old code treated it as undefined !== false → true → --follow added. The new code treats it as falsy → --follow omitted.

    Impact: Symlinked directories in a project are no longer traversed by the @ file picker or ripgrep search in the TUI. This affects workspace setups that use symlinks to aggregate multiple project directories.

    Fix: The file indexer call should explicitly pass follow: true:
    for await (const file of Ripgrep.files({ cwd: Instance.directory, follow: true })) {

  7. github-actions commented on Apr 9, 2026

    @github-actions
    github-actionsBot
    on Apr 9, 2026 – with GitHub Actions
    Contributor
    More actions

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

  8. github-actions
    closed this as completedon Apr 9, 2026
  9. danielxxomg
    added a commit that references this issue on May 20, 2026

    fix(filesystem): resolve symlink/junction targets to directory type i…

    This issue will close once commit 7b29ce7 is merged into the 'dev' branch.
    7b29ce7
  10. danielxxomg
    added a commit that references this issue on Jun 4, 2026

    fix(filesystem): resolve symlink/junction targets to directory type i…

    This issue will close once commit eccb75a is merged into the 'dev' branch.
    eccb75a
  11. ntaraujo
    added a commit that references this issue on Jun 5, 2026

    fix(filesystem): resolve symlink/junction targets to directory type i…

    This issue will close once commit 8559f60 is merged into the 'dev' branch.
    8559f60
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @rekram1-node
    rekram1-node

Labels

bugSomething isn't workingwebRelates to opencode on web / desktop

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.