# CLAUDE_CODE_GLOB_TIMEOUT_SECONDS

> It sets how long a file search may run, in seconds.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** CLAUDE_CODE_GLOB_TIMEOUT_SECONDS environment variable

## Think of it like

It is like how long you look for a lost sock before you stop.

## Definition

CLAUDE_CODE_GLOB_TIMEOUT_SECONDS sets how long a Glob or Grep search may run. Unlike most timeouts, it is in seconds. The default is 20 seconds, or 60 seconds on WSL.

## Example

Emma's repo has millions of files, and searches kept stopping halfway. She gives them 90 seconds, and they finish.

## Example code

```bash
export CLAUDE_CODE_GLOB_TIMEOUT_SECONDS=90
claude
```

Give searches in a huge repo more time.

## Why it matters

A search that stops early can miss the file Claude needs, with no sign it did.

## Common mistake

Writing it in milliseconds. This one counts in seconds, not like the rest.

## Three principles

- **Seconds.** Not milliseconds.
- **Default 20.** 60 on WSL.
- **Glob and Grep.** Both.

## Related terms

- [Glob Tool](https://learn.benibix.com/term/ai/glob-tool)
- [Grep Tool](https://learn.benibix.com/term/ai/grep-tool)

---

Source: https://learn.benibix.com/term/ai/claude-code-glob-timeout-seconds-variable
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
