Skip to content

Glob Tool Fails to Match Files with Spaces in Filenames

Context

During /vt-c-inbox-qualify, the Glob tool was called with pattern intake/inbox/*.md and path /Users/rolf/01-repositories/V025-claude-toolkit. It returned zero results despite 4 .md files being present in the directory. All 4 files had spaces in their filenames (e.g., 2026-03-11 claude-code-simplify-command-practical-guide.md).

A follow-up ls via Bash confirmed the files existed and were valid .md files. The Glob tool's internal implementation does not reliably match filenames containing spaces.

Root Cause

The Claude Code Glob tool does not handle filenames with spaces correctly when using wildcard patterns like *.md. Files whose names include spaces are silently excluded from results, causing a false "no files found" response.

Impact

The skill reported "Inbox empty — nothing to qualify" and would have exited without processing any items. The user had to intervene and correct the false negative.

Workaround Applied

Used Bash + ls to list the inbox directory, then used absolute paths with Read for each file individually.

Decision

Create an intake proposal to fix /vt-c-inbox-qualify to use Bash ls or find as the primary inbox scan instead of Glob, with Glob as a secondary fallback for environments where filenames are guaranteed space-free.