Skip to content

The issue of being unable to create files in Windows (CR LF) format #18616

Closed as not planned

Description

@cyf007-lab

Description

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

  1. Open OpenCode
  2. Input prompt: Create a batch file and output the current operating system and shell environment, requiring Chinese output
  3. AI will create batch files and then try them out. Due to the Unix (LF) format, errors are inevitable during the run
  4. Then the AI will get stuck in repeated attempts at modification

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

Windows Terminal + Git Bash

Activity

  1. github-actions commented on Mar 22, 2026

    @github-actions
    Contributor

    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.

  2. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Mar 22, 2026
  3. added a commit that references this issue on Mar 31, 2026
    8dbc3ee
  4. removed
    bugSomething isn't working
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  5. github-actions commented on Jul 4, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions