Tools reference changedtools-reference
Nearest release: v2.1.335, published 6 hours before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Upstream edited this page at 3 Dec 2026 04:04 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 3 Dec 2026 04:07 UTC.
Upstream edited
Recorded here
Lines+5added
Lines−0removed
From line
325
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits113to this page, all time
### Glob patterns and results ### Glob permission and input checks
The whole hunk
from line 325, old and new numbered
/
from line 325
325325* You name `Glob` or `Grep` in [`--tools` or `--allowedTools`](https://code.claude.com/docs/en/cli-reference#cli-flags) when you start the session, or in the equivalent [Agent SDK](https://code.claude.com/docs/en/agent-sdk/overview.md) options. With `--tools` you get the ones you list, and naming either tool in `--allowedTools` restores both. An allow rule in a settings file doesn't have this effect.
326326* A permissions [deny rule](https://code.claude.com/docs/en/permissions.md#match-all-uses-of-a-tool), the `--disallowedTools` flag, or [`--restricted`](https://code.claude.com/docs/en/cli-reference#cli-flags) removes `Bash` from the session.
327327* A [subagent](https://code.claude.com/docs/en/sub-agents.md#available-tools) lists `Glob` or `Grep` in its `tools` field and leaves out `Bash`. The listed tools come back for that subagent only, or for the whole session when it runs as the main session agent through [`--agent`](https://code.claude.com/docs/en/sub-agents#invoke-subagents-explicitly) or the `agent` setting.
328* You use [Code Mode](https://code.claude.com/docs/en/code-mode.md), where the code that Claude writes can call both tools by default. If you check searches with `Bash` rules or hooks, [add checks for both tools](https://code.claude.com/docs/en/code-mode.md#check-file-searches-from-code).
328329
330### Glob patterns and results
331
329332Glob supports standard glob syntax including `**` for recursive directory matching:
330333
331334* `**/*.js` matches all `.js` files at any depth
from line 338
335338Results 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.
336339
337340Glob doesn't respect `.gitignore` by default, so it finds gitignored files alongside tracked ones. This differs from [Grep](#grep-tool-behavior), which skips gitignored files. To make Glob respect `.gitignore`, set `CLAUDE_CODE_GLOB_NO_IGNORE=false` before launching Claude Code.
341
342### Glob permission and input checks
338343
339344Claude 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](https://code.claude.com/docs/en/permissions.md#working-directories), so a permission prompt for a path doesn't mean the path exists.
340345
No line in this hunk matches that.