Skip to content

Model adds n from new line symbol to generated code #4685

Closed as duplicate

Description

@pawelel

Description

Generated code has new line symbol added, which creates "n" at line start.
"\n"

OpenCode version

1.0.107

Steps to reproduce

Ask for code generation (longer code means more likely it will add new line symbol)
See the result.
I used gemini-5-mini. Custom instruction added to AGENTS.md didn't solve the issue.

Screenshot and/or share link

Image

Operating System

Windows 11

Terminal

pwsh within Windows Terminal, Terminal Reworked 2025 (IntelliJ)

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 24, 2025
  2. github-actions commented on Nov 24, 2025

    @github-actions
    Contributor

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

    Feel free to ignore if your specific case is different.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions