Atlas grep fails with "pattern is required" because GrepTool validates params.pattern before asking for permission or touching the filesystem, so an empty pattern never reaches ripgrep. The fix is to supply a non-empty `pattern`, and to remember that it is a regex, not a plain substring. Use `include` to scope by file glob and `path` to scope by directory rather than leaving the pattern blank and hoping the other parameters do the filtering. If what you actually want is to list files by name rather than search their contents, use glob instead of grep, and escape regex metacharacters when you are searching for literal braces or parentheses.
Why does Atlas grep say "pattern is required"
Atlas grep says "pattern is required" because GrepTool validates params.pattern before asking for permission or touching the filesystem. An empty pattern never reaches ripgrep, so the call fails immediately with no permission prompt and 0 files searched.
The validation order is the interesting part. GrepTool checks the pattern first, ahead of the permission gate and ahead of any filesystem access, which means a malformed call is rejected at the cheapest possible point. Nothing is read, nothing is prompted, and nothing changes on your machine. That ordering also explains why the error looks so abrupt: there is no partial output to inspect and no permission dialog to dismiss, just a single line saying the pattern is missing. An empty pattern is not a search that matches everything, it is not a search at all, and Atlas declines to guess what you meant by it.
How to write a valid pattern for Atlas grep
Supply a non-empty `pattern` to Atlas grep, and treat it as a regex rather than a plain substring. A word like handleRequest works because it contains 0 metacharacters, but a pattern with braces, parentheses, dots, or pipes is interpreted as regex syntax and will not match those characters literally.
The regex semantics are the second most common source of surprise on this tool, right after the missing pattern itself. Searching for a function call by typing its name with parentheses matches a group, not a literal call. Searching for a dotted property matches any character where you meant a period. Escape regex metacharacters when searching for literal braces or parentheses, and the pattern does what you expected. When you want a broad match, the regex power is an advantage: an alternation finds several spellings of a symbol in one pass, which no substring search can do. The point is to know which mode you are in.
How to scope an Atlas grep search with include and path
Scope an Atlas grep search with 2 parameters: use `include` to scope by file glob and `path` to scope by directory. Those are the correct places to narrow a search, and neither one substitutes for the required `pattern`, which is what grep actually matches against.
People sometimes reach for a blank pattern precisely because they are thinking in terms of scope rather than content: they want everything in one directory, or every file of one kind. Grep is not the tool for that, and leaving the pattern empty does not turn it into one. Use `include` and `path` alongside a real pattern to answer questions like where a symbol appears within one package, or which config files mention a given key. Every Atlas tool call is permission-gated against allow, ask, and deny rules before it runs, so a tightly scoped grep is also a smaller permission ask than a repository-wide one.
Should I use Atlas grep or glob
Use Atlas grep to search file contents and glob to list files by name. Those are 2 different questions. If you want to list files by name rather than content, use glob instead of grep, because an empty pattern in grep just produces the pattern is required error.
The two tools answer different questions and confusing them is the most common way to end up with an empty pattern. Grep asks: which lines in which files say this. Glob asks: which files are called this. If you are hunting for a symbol, an error string, a config key, or a call site, grep is right and the pattern is the symbol. If you are hunting for a file whose name you half remember, glob is right and the pattern is a filename glob. Atlas searches code with hybrid semantic and keyword retrieval fused by reciprocal rank fusion, so between grep, glob, and semantic search, there is a tool matched to each shape of question.
How to verify the Atlas grep pattern fix worked
Verify the Atlas grep fix by re-running the call. A non-empty pattern passes GrepTool's validation, the permission check runs, and ripgrep returns matching lines. The absence of "pattern is required" means the pattern parameter reached the tool with at least 1 character in it.
Getting past validation is not the same as getting the results you wanted, so check the output too. A valid pattern that returns nothing means grep searched and found no matches, which is a real answer and often a useful one, but it can also mean the regex is matching something other than what you intended. If you searched for a literal with metacharacters in it and got zero hits, escape the metacharacters and try again before concluding the code is not there. If you scoped with `include` or `path` and got nothing, widen the scope one step and see whether the matches were simply outside the boundary you drew.
How to fix it
- 01Supply a non-empty `pattern`. It is a regex, not a plain substring, so a bare word matches as a regex that happens to have no metacharacters.
- 02Use `include` to scope by file glob and `path` to scope by directory, instead of leaving the pattern blank and expecting the scope parameters to do the work.
- 03If you want to list files by name rather than content, use glob instead of grep.
- 04Escape regex metacharacters when searching for literal braces or parentheses, since an unescaped metacharacter changes what the pattern matches.
- 05Re-run grep and confirm it returns matching lines rather than the pattern is required error.
Frequently asked questions
- what does pattern is required mean in Atlas grep
- Atlas's GrepTool validates params.pattern before asking for permission or touching the filesystem, so an empty pattern never reaches ripgrep. The message means the pattern parameter was missing or empty.
- is the Atlas grep pattern a regex or a substring
- It is a regex, not a plain substring. A word with no metacharacters behaves like a substring, but braces, parentheses, dots, and pipes are interpreted as regex syntax.
- how do I search for a literal parenthesis in Atlas grep
- Escape regex metacharacters when searching for literal braces or parentheses. Unescaped, they are read as regex syntax and will not match the characters themselves.
- how do I limit an Atlas grep search to one folder
- Use `path` to scope by directory, and `include` to scope by file glob. Both work alongside a non-empty `pattern`, which is still required.
- can I use Atlas grep to list files by name
- No. If you want to list files by name rather than content, use glob instead of grep. Leaving grep's pattern empty to list files just produces the pattern is required error.
- does Atlas grep ask for permission before searching
- Yes, but the pattern check comes first. GrepTool validates params.pattern before asking for permission or touching the filesystem, so an empty pattern fails before any prompt appears.
- why does my valid Atlas grep pattern return no matches
- Either the code genuinely does not contain it, or the regex is matching something other than what you meant. Escape metacharacters, or widen the `include` and `path` scope, and search again.
Try Atlas in your terminal
The terminal-native AI coding agent. Free core, single binary.
Install AtlasRelated guides
Atlas for Deno: Terminal-Native AI Coding in 2026
Atlas is a terminal-native AI coding agent for Deno. Tighten --allow-all down to real permission scopes, add JSR deps, and run deno test and deno check in 2026.
Atlas with GLM-4.5-Flash: The Free Reasoning Slot in 2026
GLM-4.5-Flash is listed at $0.00 per Mtok input and output on Z.ai, with the full 128K tokens (131,072) context. Free background traffic for Atlas, rate limited.
Atlas with Fireworks AI (gateway) in 2026: Buying Latency with Money
Fireworks AI (gateway) serves Atlas open models with fast-router tiers: DeepSeek V4 Flash at $0.14 / $0.28 per Mtok on a 1,000,000 token context.
Atlas with DeepSeek Reasoner: Chain-of-Thought Debugging at $0.28 in 2026
DeepSeek Reasoner in Atlas: visible reasoning traces on a 1M window at $0.14 / $0.28 per Mtok, roughly 640x below GPT-5.5 Pro's $180 output rate. Setup and limits.
Atlas for C++ in 2026
In 2026, C++ developers adopt Atlas, the terminal-native AI coding agent, to enhance productivity. Atlas offers secure, context-aware assistance for modern C++ projects, integrating with CMake and ensuring code quality
Atlas with DeepSeek V4 Pro: 384K Output Tokens at $0.87 in 2026
DeepSeek V4 Pro in Atlas: the April 2026 flagship with a 1M token window, 384,000 max output tokens, and $0.435 / $0.87 per Mtok. Setup, data residency, tradeoffs.
Atlas with Kimi K2 0711: The Original Trillion-Parameter Preview in 2026
Run Atlas on Kimi K2 0711 in 2026. Moonshot's original K2 preview costs $0.60 per Mtok input, $2.50 per Mtok output, with a 128K tokens (131,072) context.
Atlas with SiliconFlow in 2026: Qwen3 Coder 480B at $0.25/$1.00 per Mtok
Atlas with SiliconFlow in 2026: Qwen3-Coder-480B-A35B at $0.25/$1.00 per Mtok, a free Qwen3.5-4B small_model, and the api.siliconflow.cn residency question.