-
Notifications
You must be signed in to change notification settings - Fork 11.4k
Closed as not planned
Labels
Description
Description
🐞 Bug: OpenCode creates nul file on Windows (Reserved device name)
Environment
- OS: Windows 11 25H2
- Node.js: v24.13.1
- npm: v11.8.0
Description
When executing certain OpenCode commands on Windows, a file named:
nul
is created in the project directory.
On Windows, NUL is a reserved DOS device name (null device) and should not exist as a normal filesystem file. Once created, it cannot be deleted using standard methods such as:
del nul
This causes issues with Git, editors, and project tooling.
Expected Behavior
OpenCode should not create files using reserved Windows device names.
No nul file should appear in the working directory.
Actual Behavior
- A file named
nulappears in the project root. - It cannot be deleted normally.
- It may require forced deletion using the device namespace path:
del .\C:\path\to\project\nul
Possible Cause
This may be related to:
- Improper stdout/stderr redirection (
> nul) - A dependency writing to
"nul"as a filename - Cross-platform handling assuming
/dev/null - Windows-specific path handling bug
Reproduction Steps
some times
Plugins
none
OpenCode version
1.2.15
Steps to reproduce
some times
Screenshot and/or share link
No response
Operating System
Windows 11 25H2
Terminal
Windows CMD
Reactions are currently unavailable