Can not find files in dot folder #9461

Closed
opened 2026-02-16 18:12:30 -05:00 by yindo · 5 comments
Owner

Originally created by @dogmatic69 on GitHub (Feb 16, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

I have a setup where the agent creates plans on disk. Once done In a new session I tell it to implement the plan and specify the folder name. All plans are in the same place and documented to the agent (it created it after all).

90% of the time, it can not find the plan when told to implement.

The plans are in .github/work/*/<plan-name>/<files.md>

Plugins

n/a

OpenCode version

1.2.5

Steps to reproduce

  1. create plan on disk
  2. new session
  3. tell it to implement plan by folder name
  4. plan not found, does something else anyway

Screenshot and/or share link

Image Image

Operating System

ubuntu

Originally created by @dogmatic69 on GitHub (Feb 16, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description I have a setup where the agent creates plans on disk. Once done In a new session I tell it to implement the plan and specify the folder name. All plans are in the same place and documented to the agent (it created it after all). 90% of the time, it can not find the plan when told to implement. The plans are in `.github/work/*/<plan-name>/<files.md>` ### Plugins n/a ### OpenCode version 1.2.5 ### Steps to reproduce 1. create plan on disk 2. new session 3. tell it to implement plan by folder name 4. plan not found, does something else anyway ### Screenshot and/or share link <img width="1603" height="495" alt="Image" src="https://github.com/user-attachments/assets/e94add65-fe8b-4f1c-84a0-96cff51a2933" /> <img width="1409" height="961" alt="Image" src="https://github.com/user-attachments/assets/0d8aa80f-b6eb-4825-a286-3cb34a8a425b" /> ### Operating System ubuntu
yindo added the bugneeds:compliance labels 2026-02-16 18:12:30 -05:00
yindo closed this issue 2026-02-16 18:12:30 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 16, 2026):

This issue doesn't fully meet our contributing guidelines.

What needs to be fixed:

  • Missing critical context: OpenCode version is required for debugging
  • Missing Steps to reproduce - this is essential for bug reports. Please provide detailed steps showing how to:
    1. Create a plan on disk
    2. Start a new session
    3. Specify the folder name and the exact command you use
  • Missing Operating System and Terminal information (important for troubleshooting)
  • No Screenshot/share link or reproduction link provided

The issue describes a problem (agent can't find plans 90% of the time) but lacks the reproduction steps and system context needed to investigate.

Please edit this issue to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions[bot] commented on GitHub (Feb 16, 2026): <!-- issue-compliance --> This issue doesn't fully meet our [contributing guidelines](../blob/dev/CONTRIBUTING.md). **What needs to be fixed:** - Missing critical context: **OpenCode version** is required for debugging - Missing **Steps to reproduce** - this is essential for bug reports. Please provide detailed steps showing how to: 1. Create a plan on disk 2. Start a new session 3. Specify the folder name and the exact command you use - Missing **Operating System** and **Terminal** information (important for troubleshooting) - No **Screenshot/share link** or reproduction link provided The issue describes a problem (agent can't find plans 90% of the time) but lacks the reproduction steps and system context needed to investigate. Please edit this issue to address the above within **2 hours**, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know.
Author
Owner

@dogmatic69 commented on GitHub (Feb 16, 2026):

Seems like this issue. Glob does not work on . dirs? This was working previously, I would say it's the last week or two when it stopped.

Image
@dogmatic69 commented on GitHub (Feb 16, 2026): Seems like this issue. Glob does not work on . dirs? This was working previously, I would say it's the last week or two when it stopped. <img width="1393" height="386" alt="Image" src="https://github.com/user-attachments/assets/343cea99-eb57-4d2b-8124-e3eb83d5c36a" />
Author
Owner

@dogmatic69 commented on GitHub (Feb 16, 2026):

Seems like this stems from having the folder in .gitignore which causes the glob to not find the files. Not seeing why my git configuration should affect the llm's ability to find files.

Any possibility to work around this?

The bug: Ripgrep.files() at packages/opencode/src/file/ripgrep.ts:220 never passes --no-ignore to ripgrep. Since ripgrep respects .gitignore by default, any file or directory listed in .gitignore is invisible to the glob tool, ls tool, and directory tree — even when the agent is explicitly told to look for it.

Why it matters: It's perfectly normal to gitignore working files (plans, scratch notes, local configs) that you still want the agent to read. The current behavior silently returns "No files found" with no indication that files were skipped due to .gitignore.

The fix: Ripgrep.files() needs to pass --no-ignore to ripgrep. The existing --glob=!.git/* already handles excluding .git internals, so --no-ignore won't cause .git contents to leak into results.

@dogmatic69 commented on GitHub (Feb 16, 2026): Seems like this stems from having the folder in `.gitignore` which causes the glob to not find the files. Not seeing why my git configuration should affect the llm's ability to find files. Any possibility to work around this? > The bug: Ripgrep.files() at packages/opencode/src/file/ripgrep.ts:220 never passes --no-ignore to ripgrep. Since ripgrep respects .gitignore by default, any file or directory listed in .gitignore is invisible to the glob tool, ls tool, and directory tree — even when the agent is explicitly told to look for it. > > Why it matters: It's perfectly normal to gitignore working files (plans, scratch notes, local configs) that you still want the agent to read. The current behavior silently returns "No files found" with no indication that files were skipped due to .gitignore. > > The fix: Ripgrep.files() needs to pass --no-ignore to ripgrep. The existing --glob=!.git/* already handles excluding .git internals, so --no-ignore won't cause .git contents to leak into results.
Author
Owner

@github-actions[bot] commented on GitHub (Feb 16, 2026):

This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new issue that follows our issue templates.

@github-actions[bot] commented on GitHub (Feb 16, 2026): This issue has been automatically closed because it was not updated to meet our [contributing guidelines](../blob/dev/CONTRIBUTING.md) within the 2-hour window. Feel free to open a new issue that follows our issue templates.
Author
Owner

@dogmatic69 commented on GitHub (Feb 16, 2026):

@rekram1-node why was this closed when it has clearly has "missing" information?

@dogmatic69 commented on GitHub (Feb 16, 2026): @rekram1-node why was this closed when it has clearly has "missing" information?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9461