Skip to content

Local agent settings don't override global settings #4217

Closed

Description

@jason0x43

Description

In my global config I have:

  "agent": {
    "plan": {
      "model": "anthropic/claude-sonnet-4-5",
      "permission": {
        "bash": {
          "echo *": "allow",
          "find *": "allow",
          "grep *": "allow",
          "rg *": "allow",
          "fd *": "allow",
          "head *": "allow",
          "tail *": "allow"
        }
      }
    },
    "build": {
      "model": "anthropic/claude-sonnet-4-5"
    }
  },

In a project local config I want to override the models with:

  "agent": {
    "plan": {
      "model": "github-copilot/claude-sonnet-4.5",
    },
    "build": {
      "model": "github-copilot/claude-sonnet-4.5"
    }
  },

However, this doesn't work. When I start opencode, I see that the globally configured models are being used for the build and plan agents. When I dump the config with opencode debug config in the project directory, I see that some settings from my project config were applied, but the agent settings were not.

My project local agent config is used if I remove the global agent overrides.

OpenCode version

1.0.58

Steps to reproduce

  1. Override some of the built in agent config in ~/.config/opencode/opencode.json
  2. Override the same build in agent config in <project>/opencode.json
  3. Run opencode debug config and verify that the project local overrides weren't applied

Screenshot and/or share link

No response

Operating System

mac0S 26.1

Terminal

kitty

Activity

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

    @github-actions
    Contributor

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

    Feel free to ignore if none of these address your specific case.

  3. removed
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 11, 2025
  4. self-assigned this
    on Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions