Description
The glob tool silently returns zero results when any broken symlink (or permission-denied path) exists anywhere in the directory tree being searched. This happens because Ripgrep.files() treats ripgrep exit code 2 as fatal and discards all stdout output, even though valid file paths were already emitted.
The search() function (used by the grep tool) already handles this correctly — it passes --no-messages and treats exit code 2 as non-fatal (returning partial: true). The files() function was missed.
Plugins
oh-my-openagent@latest
OpenCode version
1.14.28
Steps to reproduce
- Create a broken symlink anywhere in your home directory (or have one from a package manager like pnpm, Firefox lock files, etc.)
- Use the glob tool to search for a file that exists
- Glob returns zero results despite the file existing
Common sources of broken symlinks: pnpm stores pointing to deleted git worktrees, browser lock files, AUR/paru cache with restricted permissions.
Operating System
Arch Linux (kernel 6.14.4)
Terminal
Kitty
Description
The glob tool silently returns zero results when any broken symlink (or permission-denied path) exists anywhere in the directory tree being searched. This happens because
Ripgrep.files()treats ripgrep exit code 2 as fatal and discards all stdout output, even though valid file paths were already emitted.The
search()function (used by the grep tool) already handles this correctly — it passes--no-messagesand treats exit code 2 as non-fatal (returningpartial: true). Thefiles()function was missed.Plugins
oh-my-openagent@latest
OpenCode version
1.14.28
Steps to reproduce
Common sources of broken symlinks: pnpm stores pointing to deleted git worktrees, browser lock files, AUR/paru cache with restricted permissions.
Operating System
Arch Linux (kernel 6.14.4)
Terminal
Kitty