anomalyco / anomalyco/opencode

Glob returns hidden files with hidden disabled

Open
#47,421 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

A broad glob returns hidden files even with hidden: false or the option omitted. The registered tool description says hidden files and directories are excluded by default.

Plugins

Built-in glob tool; native ripgrep 15.2.0.

OpenCode version

V2 source checkout at 541937d12449e64d078c67e9013f1c288004b83f.

Steps to reproduce
  1. Create a temporary directory containing visible.ts, .hidden.ts, and .hidden/nested.ts.
  2. Run the glob tool with pattern: "**/*.ts", first omitting hidden, then setting it to false.

Expected: only visible.ts. Actual: .hidden.ts and visible.ts. This fixture does not traverse the hidden directory unless hidden: true; that option correctly returns all three files. The positive ripgrep glob overrides hidden-basename filtering.

Operating System

macOS arm64, Bun 1.4.1.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the built-in glob tool entry point and reproduce the issue with the temporary directory containing visible.ts, .hidden.ts, and .hidden/nested.ts. Trace how the positive ripgrep glob interacts with hidden-basename filtering, then add regression coverage showing that omitted or false hidden excludes both hidden files and hidden directories while true returns all three.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.