Description
Problem
The opencode web UI 'Open project' modal calls /find/file?directory=<home>&query=&type=directory to populate the project picker. fff (the file finder) refuses to initialize when the basePath is the user's home directory:
Failed to init file picker: Can not run certain FFF features in a file system root or home directories. Consider smaller per-project directories.
This means the project picker search returns [] and users cannot find/open projects that live under their home directory (the common case). The modal only shows 'Recent projects' (2 entries from the project table), not the full list of available projects.
Root cause
FileFinder.create() supports enableHomeDirScanning: true and enableFsRootScanning: true options (see dmtrKovalenko/fff#588), but opencode calls it with the defaults (false). There is no env var or config option to override this:
- No
OPENCODE_ENABLE_HOME_SCANor similar env var - No config field in
opencode.jsonfor fff options OPENCODE_DISABLE_FFF=1falls back to a readdir-based finder, but it (a) returns an array of strings instead of objects (UI expects{path, type, score}), and (b) returns[]for empty queries, so the modal still shows nothing.
Environment
- opencode 1.17.11 (Bun binary)
- WSL2 Debian, WorkingDirectory=/home/abdullah/repos (symlink to /mnt/c/Repos)
- Projects stored under ~/repos, which equals $HOME/repos
Proposed fix
Expose enableHomeDirScanning / enableFsRootScanning via:
- Env vars (e.g.
OPENCODE_FFF_ENABLE_HOME_SCAN=1), or - A config field in
opencode.json(e.g."fff": {"enableHomeDirScanning": true}), or - Auto-enable when the service's WorkingDirectory is inside $HOME (common for web deployments).
Workaround
None that works cleanly. Setting HOME to a dummy dir breaks the /path endpoint's home field (UI searches the wrong directory). Setting HOME to the repos dir makes fff refuse (basePath == homedir).
Activity
github-actions commentedon Jul 20, 2026
This issue might be a duplicate of existing issues. Please check:
enableHomeDirScanning/enableFsRootScanningflags being enabled when cwd is $HOME, with the same suggested fix of disabling or guarding those flagsquery=against the home directory/find/fileendpoint returning no resultsEricZhou05 commentedon Aug 11, 2026
Fixed in #41158.
github-actions commentedon Oct 10, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.