You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The issue of being unable to create files in Windows (CR LF) format #18616
I use OpenCode under the Windows system. It's an excellent AI programming tool, and I really like it.
However, I am currently troubled by a problem and unsure if it can be resolved:
Using batch processing to call programs is a commonly used method in CMD/PowerShell. However, the batch files created by OpenCode are always in Unix (LF) format, whereas in the CMD/PowerShell environment, they must be in Windows (CR LF) format. Otherwise, the operation will definitely fail, especially when outputting non-English information.
This is a minor issue, but when AI encounters such problems, it often fails to solve them and can only try repeatedly, sometimes even altering the correct batch file beyond recognition.
Don't recommend me to use the WSL environment. I don't want to change my working environment.
Plugins
No plugins were used
OpenCode version
1.2.27
Steps to reproduce
Open OpenCode
Input prompt: Create a batch file and output the current operating system and shell environment, requiring Chinese output
AI will create batch files and then try them out. Due to the Unix (LF) format, errors are inevitable during the run
Then the AI will get stuck in repeated attempts at modification
Activity
github-actions commentedon Mar 22, 2026
This issue might be a duplicate of existing issues. Please check:
Please review those issues and add your feedback there if they cover your use case.
fix: preserve CRLF line endings and BOM on Windows file writes
github-actions commentedon Jul 4, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.