Glob tool behavior
The Glob tool finds files by name pattern. It supports standard glob syntax including ** for recursive directory matching:
**/*.jsmatches all.jsfiles at any depthsrc/**/*.tsmatches all.tsfiles undersrc/*.\{json,yaml\}matches.jsonand.yamlfiles in the current directory
Results are sorted by modification time and capped at 100 files. If the cap is hit, Claude sees a truncation flag in the result and can narrow the pattern.
Glob doesn't respect .gitignore by default, so it finds gitignored files alongside tracked ones. This differs from Grep, which skips gitignored files. To make Glob respect .gitignore, set CLAUDE_CODE_GLOB_NO_IGNORE=false before launching Claude Code.
Claude Code decides permission for a Glob call before it checks whether the search directory exists. It still runs the read-permission check for a missing path outside the working directories, so a permission prompt for a path doesn't mean the path exists.
A pattern or path value that contains a null byte returns an error asking Claude to remove it.