exclude node_modules #3110

Closed
opened 2026-02-16 17:38:41 -05:00 by yindo · 1 comment
Owner

Originally created by @pumpa0 on GitHub (Nov 25, 2025).

Question

Is there a way to prevent the AI from reading node_modules or other unnecessary files? It has read node_modules several times, and since the folder is huge and unimportant, it ends up wasting a lot of time.

Originally created by @pumpa0 on GitHub (Nov 25, 2025). ### Question Is there a way to prevent the AI from reading node_modules or other unnecessary files? It has read node_modules several times, and since the folder is huge and unimportant, it ends up wasting a lot of time.
yindo closed this issue 2026-02-16 17:38:41 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 25, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #3164: Exclude files from being used (requests file exclusion functionality)
  • #4633: It should be possible to instruct opencode which files to ignore (references .gemini-ignore model)
  • #4694: Files mentioned in .gitignore are not getting ignored (shows .gitignore patterns should already work)

These issues discuss the same core feature request: preventing OpenCode from reading unnecessary large folders like node_modules to reduce token usage and improve performance.

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Nov 25, 2025): This issue might be a duplicate of existing issues. Please check: - #3164: Exclude files from being used (requests file exclusion functionality) - #4633: It should be possible to instruct opencode which files to ignore (references .gemini-ignore model) - #4694: Files mentioned in .gitignore are not getting ignored (shows .gitignore patterns should already work) These issues discuss the same core feature request: preventing OpenCode from reading unnecessary large folders like node_modules to reduce token usage and improve performance. Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3110