Built-in ripgrep EAGAIN timeout on startup in repos with large gitignored directories (regression in 2.1.27)

Resolved 💬 6 comments Opened Jan 31, 2026 by rodaguilera Closed Mar 5, 2026

Description

After upgrading to Claude Code 2.1.27 (Homebrew cask), starting a session in a dotfiles repo causes Claude Code's built-in ripgrep to time out on startup. This did not happen in the previous version.

Evidence

System ripgrep works fine on the same directory:

$ cd ~/macdotfiles && rg --files | wc -l
102
# Completes in 0.01s — .gitignore respected correctly

$ rg --no-ignore --files .config/ | wc -l
11547
# Even without gitignore, completes in 0.045s

Claude Code's built-in ripgrep fails:

From the debug log (~/.claude/debug/<session-id>.txt):

[DEBUG] Ripgrep first use test: PASSED (mode=builtin, path=/opt/homebrew/Caskroom/claude-code/2.1.27/claude)
[DEBUG] rg EAGAIN error detected, retrying with single-threaded mode (-j 1)
[DEBUG] rg error (signal=undefined, code=ABORT_ERR, stderr: ), 0 results
[ERROR] AbortError: The operation was aborted.
[ERROR] RipgrepTimeoutError: Ripgrep search timed out after 20 seconds. The search may have matched files but did not complete in time.

The built-in ripgrep hits an EAGAIN (resource temporarily unavailable) error, retries in single-threaded mode (-j 1), and then times out at 20 seconds. The session appears to freeze/hang.

Reproduction

  1. Have a git repo (~960 MB on disk, ~170 MB tracked) where ~/.config and ~/.vim are whole-directory symlinks into the repo
  2. The repo contains gitignored auto-generated content: ~/.config/coc/ (592 MB, coc.nvim extensions with deeply nested node_modules) and ~/.vim/plugged/ (~200 MB, 20 vim plugins with nested .git dirs)
  3. The .gitignore correctly handles these with deny-all + re-include patterns
  4. Start Claude Code in this repo → built-in ripgrep times out, session freezes

Expected behavior

Claude Code's built-in ripgrep should handle this directory at least as well as system ripgrep (which completes in 0.01s).

Workaround

Deleting ~/.claude/projects/-Users-<username>-<repo>/ (project cache) allows Claude Code to start, but the issue may recur.

Environment

  • Claude Code version: 2.1.27
  • Installation: Homebrew cask (/opt/homebrew/Caskroom/claude-code/2.1.27/claude)
  • macOS (Apple Silicon)
  • Bun runtime
  • System ripgrep: works correctly on the same directory

View original on GitHub ↗

This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗