Skip to content

Project picker fails when selecting $HOME after another FFF picker is initialized #31555

Closed

Description

@rexdotsh

Description

The web project picker can fail when selecting or searching $HOME if OpenCode has already initialized an FFF picker for another directory.

The relevant code in packages/core/src/filesystem/search.ts says home scanning should be allowed when the user opened OpenCode at $HOME or explicitly asked to search there:

// only the first toolcall picker can accumulate resources to index
// home directory, if the user specifically opened opencode at the
// $HOME level or asked it to search there on purpose, otherwise fallback
enableHomeDirScanning: isFirstPicker,

But the implementation only checks whether this is the first picker. That covers opening OpenCode at $HOME, but not selecting $HOME later from the project picker.

In my repro, OpenCode initialized FFF for project directories first, then later tried $HOME from the picker:

creating instance directory=/home/user/project-a
creating instance directory=/home/user/project-b
creating instance directory=/home/user
fff init failed dir=/home/user error="Failed to init file picker: Can not run certain FFF features in a file system root or home directories. Consider smaller per-project directories."

Since $HOME was not the first picker, OpenCode passed enableHomeDirScanning: false, and FFF rejected the request.

Plugins

N/A

OpenCode version

1.16.2

Steps to reproduce

  1. Start OpenCode in a project under $HOME.
  2. Open the web UI project picker.
  3. Select or search from $HOME after another project picker has already been initialized.
  4. Observe the picker request fail.

Screenshot and/or share link

No response

Operating System

Ubuntu 22.04

Terminal

Ghostty

Activity

  1. thdxr commented on Jun 10, 2026

    @thdxr
    Member

    fixed

  2. rexdotsh commented on Jun 10, 2026

    @rexdotsh
    ContributorAuthor

    thanks! yeah probably best to put fff behind a flag for a bit..
    FWIW, i've def noticed some speed improvements with fff, but at the cost of a slower initial loading time...

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions