[BUG] Glob tool fails silently when pattern contains relative directory path without path parameter

Resolved 💬 3 comments Opened Dec 17, 2025 by kenmaz Closed Dec 20, 2025

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Glob tool returns "No files found" when the pattern includes a relative directory path (e.g., subdir/**/*.md) without specifying the path parameter, even though files exist.

The workaround is to use the path parameter separately:

  • pattern: "subdir/**/*.md" → No files found
  • pattern: "**/*.md", path: "subdir" → Files found

What Should Happen?

Either:

  1. Relative directory paths in the pattern should work, OR
  2. The tool should return an error/warning explaining the limitation

Silent failure causes agents to make incorrect decisions.

Error Messages/Logs

No files found

No error, no warning. Just empty results.

Steps to Reproduce

  1. Have files at <project>/subdir/file.md
  2. Working directory is <project>
  3. Run: Glob(pattern: "subdir/**/*.md") → Returns "No files found"
  4. Run: Glob(pattern: "**/*.md", path: "subdir") → Successfully finds files

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.71 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Related Issues:

  • #13502 - Similar issue with absolute paths (fixed in v2.0.69)
  • #10337 - Windows absolute path issue

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗