ENOENT error when referencing file paths in OpenCode AI CLI (windows) #1841

Closed
opened 2026-02-16 17:32:53 -05:00 by yindo · 8 comments
Owner

Originally created by @Aaryan6 on GitHub (Sep 26, 2025).

Originally assigned to: @rekram1-node on GitHub.

When mentioning a file path in the OpenCode CLI, the message fails to send and throws an ENOENT error. It seems like the CLI is trying to scan a directory that doesn’t exist (but it exists).

Image

Also, when searching for files using @filename (e.g., @hero), the CLI does not identify the file.

Image

System: Windows 11
Opencode version: 0.11.8

How to resolve this?

Originally created by @Aaryan6 on GitHub (Sep 26, 2025). Originally assigned to: @rekram1-node on GitHub. When mentioning a file path in the OpenCode CLI, the message fails to send and throws an ENOENT error. It seems like the CLI is trying to scan a directory that doesn’t exist (but it exists). <img width="1440" height="656" alt="Image" src="https://github.com/user-attachments/assets/d1ed9e45-8440-497c-8d8a-8d6e40732a05" /> Also, when searching for files using @filename (e.g., @hero), the CLI does not identify the file. <img width="1442" height="655" alt="Image" src="https://github.com/user-attachments/assets/dc4ce989-0e40-4078-a454-98f10d3b52fb" /> System: Windows 11 Opencode version: 0.11.8 How to resolve this?
yindo closed this issue 2026-02-16 17:32:53 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Sep 26, 2025):

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

  • #1583: Windows file reference problem where OpenCode incorrectly prepends a Linux root / to Windows file paths, making it impossible for the LLM to find files
  • #1374: Fuzzy file search (@filename) not working correctly on Windows (PowerShell) while working fine on WSL - exactly matches the second part of your report
  • #2261: @ symbols in commands that don't resolve to files cause command failure with ENOENT errors - similar to the file reference issue you're experiencing

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

@github-actions[bot] commented on GitHub (Sep 26, 2025): This issue might be a duplicate of existing issues. Please check: - #1583: Windows file reference problem where OpenCode incorrectly prepends a Linux root `/` to Windows file paths, making it impossible for the LLM to find files - #1374: Fuzzy file search (@filename) not working correctly on Windows (PowerShell) while working fine on WSL - exactly matches the second part of your report - #2261: @ symbols in commands that don't resolve to files cause command failure with ENOENT errors - similar to the file reference issue you're experiencing Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Sep 26, 2025):

I think this may be a duplicate of #1374.

@itsrainingmani is our windows guy so he can help out more here

@rekram1-node commented on GitHub (Sep 26, 2025): I think this may be a duplicate of #1374. @itsrainingmani is our windows guy so he can help out more here
Author
Owner

@Aaryan6 commented on GitHub (Sep 26, 2025):

Thanks, it's the same issue!
But it's been a month, when can I expect this to be solved? I really wanna try opencode!!! 🥺

@Aaryan6 commented on GitHub (Sep 26, 2025): Thanks, it's the same issue! But it's been a month, when can I expect this to be solved? I really wanna try opencode!!! 🥺
Author
Owner

@rekram1-node commented on GitHub (Sep 26, 2025):

Haha I will try to spin up a VM and debug it if i find time, the tui is also currnetly being rebuilt from ground up by Dax and that may address some compatibility issues!

@rekram1-node commented on GitHub (Sep 26, 2025): Haha I will try to spin up a VM and debug it if i find time, the tui is also currnetly being rebuilt from ground up by Dax and that may address some compatibility issues!
Author
Owner

@itsrainingmani commented on GitHub (Sep 26, 2025):

Hi, this should be fixed by - #2665. @rekram1-node would you mind taking a look at the PR?

@itsrainingmani commented on GitHub (Sep 26, 2025): Hi, this should be fixed by - #2665. @rekram1-node would you mind taking a look at the PR?
Author
Owner

@rekram1-node commented on GitHub (Sep 26, 2025):

@itsrainingmani yes I will, I will test on my machine to make sure it works on non windows still and depending on scope of changes I may need to have someone from team review but I will lyk

@rekram1-node commented on GitHub (Sep 26, 2025): @itsrainingmani yes I will, I will test on my machine to make sure it works on non windows still and depending on scope of changes I may need to have someone from team review but I will lyk
Author
Owner

@itsrainingmani commented on GitHub (Sep 26, 2025):

I've tested on MacOS so hopefully it should check out for you too. I'll re-ping Dax as well

@itsrainingmani commented on GitHub (Sep 26, 2025): I've tested on MacOS so hopefully it should check out for you too. I'll re-ping Dax as well
Author
Owner

@rekram1-node commented on GitHub (Sep 26, 2025):

@itsrainingmani left a comment on PR

@rekram1-node commented on GitHub (Sep 26, 2025): @itsrainingmani left a comment on PR
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1841