opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Fix Documentation on Modes - Update modes.mdx

Open brendancopley opened this issue 6 months ago • 0 comments

Fix configuration with mode.{name}.prompt

based on past documentation the following doesn't work

  "mode": {
    "build": {
      "model": "anthropic/claude-sonnet-4-20250514",
      "prompt": "{file:./agents/atlas/atlas_fastrtc_developer.md}",
      "name": "Atlas",
      "tools": {
        "write": true,
        "edit": true,
        "bash": true
      }
    },

After looking into opencode/packages/opencode/src/session/mode.ts:56 https://github.com/sst/opencode/blob/c7f30e1065c666f8eb687db75bdc06ce4b8c4882/packages/opencode/src/session/mode.ts#L56 The correct way is the following:

  "mode": {
    "build": {
      "model": "anthropic/claude-sonnet-4-20250514",
      "prompt": "./agents/atlas/atlas_fastrtc_developer.md",
      "name": "Atlas",
      "tools": {
        "write": true,
        "edit": true,
        "bash": true
      }
    },

brendancopley avatar Jul 10 '25 21:07 brendancopley