gemini-cli - 💡(How to fix) Fix FindFiles traverses all of files runs out of memory [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
google-gemini/gemini-cli#24929Fetched 2026-04-09 08:17:15
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×2added_to_project_v2 ×1parent_issue_added ×1

Code Example

> /about
# paste output here
RAW_BUFFERClick to expand / collapse

What happened?

FindFiles traverses all of files runs out of memory

See the Internal Gemini CLI Issues list

What did you expect to happen?

Not to OOM

Client information

<details> <summary>Client Information</summary>

Run gemini to enter the interactive CLI, then run the /about command.

> /about
# paste output here
</details>

Login information

No response

Anything else we need to know?

No response

extent analysis

TL;DR

Optimizing the FindFiles function to reduce memory usage is likely necessary to prevent running out of memory.

Guidance

  • Review the FindFiles function to identify potential memory leaks or inefficient memory usage patterns.
  • Consider implementing pagination or batching to limit the number of files processed at once, reducing memory requirements.
  • Investigate using more memory-efficient data structures or algorithms to traverse files.

Notes

The exact implementation details of FindFiles are not provided, so a specific solution cannot be recommended without further information.

Recommendation

Apply workaround: Optimize the FindFiles function to reduce memory usage, as the current implementation is causing out-of-memory issues.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING