Skip to content

filesystem: search_files silently skips a subdirectory it cannot read #5189

Closed

Description

@cliffhall

Problem

In searchFilesWithValidation (src/filesystem/lib.ts), one try { … } catch { continue; } wraps the per-entry path validation, the match and the recursive descent. The catch is there to skip entries that resolve outside the allowed directories, but it also discards I/O errors such as EACCES from reading a subdirectory. search_files then returns a short result with no sign that it is incomplete, while directory_tree and list_directory report the same failure as an error.

Expected

Only validation failures are skipped silently. An error while walking is either reported, or the result states that it is partial; which of the two is a maintainer's call.

Prior work

The PR(s) above targeted the pre-refactor code and are closed as part of the backlog triage in #4875; this issue is where the work continues, with the PR(s) as a prototype. Thank you to their authors.

Activity

  1. added
    bugSomething isn't working
    server-filesystemReference implementation for the Filesystem MCP server - src/filesystem
    on Oct 20, 2026
  2. cliffhall commented on Oct 20, 2026

    @cliffhall
    MemberAuthor

    Triage: Priority Low (total 5)

    • Severity 2: a search silently returns a partial result
    • Urgency 2: wanted eventually
    • Bonuses:
    • +1 bug label

    Filed from the PR backlog triage (#4877). Board: Servers V2 (#43), Status Incoming, awaiting maintainer review (no milestone yet).

  3. added this to the v2.3.0 milestone on Oct 25, 2026
  4. self-assigned this
    on Oct 28, 2026
  5. cliffhall commented on Oct 29, 2026

    @cliffhall
    MemberAuthor

    Shipped in #5355, merged into v2/main; it releases with milestone v2.3.0. Tested together with the rest of the #5269 work in the rollup #5405.

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingserver-filesystemReference implementation for the Filesystem MCP server - src/filesystemv2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions