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 — fix(core): skip file watcher on filesystem roots · Issue #45611 · anomalyco/opencode

fix(core): skip file watcher on filesystem roots #45611

New issue
Copy link
New issue
Copy link
Closed
Closed
fix(core): skip file watcher on filesystem roots#45611
Copy link
Assignees
jlongster

Description

@CannonRS
CannonRS
opened on Aug 27, 2026
Issue body actions

Description

The file watcher attempts to watch filesystem roots (e.g., C:/ on Windows, / on Linux) which causes unnecessary resource usage and potential permission issues.

Reproduction Steps

  1. Open a project at filesystem root
  2. File watcher attempts to watch the entire root directory
  3. Causes high resource usage / permission errors

Expected Behavior

File watcher should skip filesystem roots and system directories.

Actual Behavior

File watcher attempts to watch roots, wasting resources.

System Info

  • OS: Linux/macOS/Windows
  • opencode version: dev

Fix

Added isRootOrSystemDirectory check in packages/core/src/filesystem/watcher.ts to skip roots (C:/, /, etc.)

Activity

  1. github-actions
    assigned
    jlongster
    on Aug 27, 2026
  2. github-actions commented on Aug 27, 2026

    @github-actions
    github-actionsBot
    on Aug 27, 2026 – with GitHub Actions
    Contributor
    More actions

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

    • watcher.ignore never reaches the embedded fff engine — per-dir inotify watches on every indexed dir (192K watches / 4.5GB RSS on a large root); root .ignore file is the only effective channel #37740: Covers the same root cause — file watcher registers inotify watches on every indexed directory when opened at a large/root path, causing high resource usage. Includes analysis of the fff engine behavior and a workaround.
    • opencode serve pegs CPU at ~1000% — fff content-indexes entire $HOME (search.ts enableHomeDirScanning/FsRootScanning) #32511: fff content-indexes $HOME (a near-root path) causing ~1000% CPU usage — same class of problem.

    If your fix is distinct from what's described there, please clarify the difference in your issue.

  3. neriousy commented on Oct 19, 2026

    @neriousy
    neriousy
    on Oct 19, 2026
    Member
    More actions

    In v2, opening a project at a filesystem root no longer sets up a recursive watch on it: the old project-directory watcher is gone, and opencode now only watches the Git HEAD (or Mercurial branch) file to notice branch changes. To get v2: npm i -g @opencode/cli@latest or curl -fsSL https://opencode.ai/v2/install | bash (desktop: update the app). If you still see this on v2, please open a new issue with the details.

  4. neriousy
    closed this as completedon Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @jlongster
    jlongster

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

    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.