Description
Glob can appear stuck when path is broad even if pattern starts with known literal directories. For example:
path: /Users/giampaolocasolla
pattern: .claude/plugins/*
On 1.18.25 this traverses the full home directory because path becomes ripgrep's working directory and pattern is only passed as a filter. Narrowing the traversal root to the literal prefix makes the call immediate.
I can contribute a focused fix that extracts safe literal directory prefixes before invoking ripgrep, preserves anchored glob semantics, and adds equivalence tests. Would that direction be acceptable for a PR? Related closed reports: #29437 and #33540.
Plugins
oh-my-opencode-slim, opencode-cmux, and local plugins. The behavior is in the native Glob implementation.
OpenCode version
1.18.25
Steps to reproduce
- Run Glob with
path set to a large home directory.
- Set
pattern to a narrow literal prefix such as .claude/plugins/*.
- Observe that Glob traverses unrelated directories and can take minutes.
- Run the equivalent call with
path: /Users/giampaolocasolla/.claude/plugins and pattern: /*; it completes immediately.
Operating System
macOS 26.6.2
Terminal
OpenChamber
Description
Glob can appear stuck when
pathis broad even ifpatternstarts with known literal directories. For example:On 1.18.25 this traverses the full home directory because
pathbecomes ripgrep's working directory andpatternis only passed as a filter. Narrowing the traversal root to the literal prefix makes the call immediate.I can contribute a focused fix that extracts safe literal directory prefixes before invoking ripgrep, preserves anchored glob semantics, and adds equivalence tests. Would that direction be acceptable for a PR? Related closed reports: #29437 and #33540.
Plugins
oh-my-opencode-slim,opencode-cmux, and local plugins. The behavior is in the native Glob implementation.OpenCode version
1.18.25
Steps to reproduce
pathset to a large home directory.patternto a narrow literal prefix such as.claude/plugins/*.path: /Users/giampaolocasolla/.claude/pluginsandpattern: /*; it completes immediately.Operating System
macOS 26.6.2
Terminal
OpenChamber