You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Symlinked directories not visible in project picker (opencode serve) #10365
Symlinked directories are not visible in the project picker when running opencode serve.
Steps to Reproduce
Create a symlink to a directory:
ln -s /mnt/data/Projects ~/Projects
Run opencode serve
Open web UI and use project picker
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
Create a symlink to a projects directory:
ln -s /mnt/data/Projects ~/Projects
Start the server:
opencode serve
3. Open web UI in browser
Open project picker dialog
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
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 })) {
Activity
github-actions commentedon Jan 24, 2026
This issue might be a duplicate of existing issues. Please check:
src/file/index.tsFeel free to ignore if none of these address your specific case.
jeroenev commentedon Feb 6, 2026
They are also not visible in ripgrep (search tool) and cannot be @tagged in opencode
panta82 commentedon Feb 7, 2026
Just got hit by this. My clanker analyzed and wrote this:
github-actions commentedon Apr 9, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.
fix(filesystem): resolve symlink/junction targets to directory type i…
fix(filesystem): resolve symlink/junction targets to directory type i…
fix(filesystem): resolve symlink/junction targets to directory type i…