opencode icon indicating copy to clipboard operation
opencode copied to clipboard

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

Open obahareth opened this issue 3 days ago • 0 comments

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

obahareth avatar Jan 12 '26 18:01 obahareth