Opencode Doesn't Abide by Prompt or Run Formatter for Ruby Files #4981

Open
opened 2026-02-16 17:47:18 -05:00 by yindo · 0 comments
Owner

Originally created by @obahareth on GitHub (Jan 12, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

Whenever opencode touches a file using any agent, it changes all my double quotes to single quotes. This behavior also appears without any plugins. It edits lines that I did not ask it to edit, it literally edits the whole file. I am not sure how to stop this behavior.

Relevant files

snippet from AGENTS.md

You follow these conventions:
- Standard Ruby style (standardrb)

IMPORTANT: Use standard to format Ruby files after completely finishing edits to a file (you can also format an entire dir)
           Example: docker compose exec web bundle exec standardrb --fix ./app/models/my_model.rb

My opencode.jsonc

{
  "$schema": "https://opencode.ai/config.json",
  "lsp": {
    "ruby-lsp": {
      "command": ["/Users/obahareth/.asdf/shims/ruby-lsp"],
      "extensions": [".rb", ".rake", ".gemspec", ".ru", ".html.erb"]
    }
  },
  "formatter": {
    "standardrb": {
      "command": ["standardrb", "--fix", "$FILE"],
      "extensions": [".rb", ".rake", ".gemspec", ".ru"]
    }
  },
  "permission": {
    "bash": {
      "*": "ask",
      "git status": "allow"
    }
  },
  "tui": {
    "scroll_speed": 1,
    "scroll_acceleration": {
      "enabled": false
    }
  }
}

Plugins

mgrep, context 7 mcp,

OpenCode version

1.1.14

Steps to reproduce

  1. Ask opencode to edit any ruby file
  2. It will replace all double quoted strings with single quotes
  3. It will never run the formatter

Screenshot and/or share link

No response

Operating System

macOS 26.2

Terminal

Cursor Extension

Originally created by @obahareth on GitHub (Jan 12, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description Whenever opencode touches a file using any agent, it changes all my double quotes to single quotes. This behavior also appears without any plugins. It edits lines that I did not ask it to edit, it literally edits the whole file. I am not sure how to stop this behavior. Relevant files snippet from AGENTS.md ``` You follow these conventions: - Standard Ruby style (standardrb) IMPORTANT: Use standard to format Ruby files after completely finishing edits to a file (you can also format an entire dir) Example: docker compose exec web bundle exec standardrb --fix ./app/models/my_model.rb ``` My opencode.jsonc ``` { "$schema": "https://opencode.ai/config.json", "lsp": { "ruby-lsp": { "command": ["/Users/obahareth/.asdf/shims/ruby-lsp"], "extensions": [".rb", ".rake", ".gemspec", ".ru", ".html.erb"] } }, "formatter": { "standardrb": { "command": ["standardrb", "--fix", "$FILE"], "extensions": [".rb", ".rake", ".gemspec", ".ru"] } }, "permission": { "bash": { "*": "ask", "git status": "allow" } }, "tui": { "scroll_speed": 1, "scroll_acceleration": { "enabled": false } } } ``` ### Plugins mgrep, context 7 mcp, ### OpenCode version 1.1.14 ### Steps to reproduce 1. Ask opencode to edit any ruby file 2. It will replace all double quoted strings with single quotes 3. It will never run the formatter ### Screenshot and/or share link _No response_ ### Operating System macOS 26.2 ### Terminal Cursor Extension
yindo added the bug label 2026-02-16 17:47:18 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4981