Local agent settings don't override global settings #2793

Closed
opened 2026-02-16 17:37:17 -05:00 by yindo · 1 comment
Owner

Originally created by @jason0x43 on GitHub (Nov 11, 2025).

Originally assigned to: @rekram1-node on GitHub.

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

Originally created by @jason0x43 on GitHub (Nov 11, 2025). Originally assigned to: @rekram1-node on GitHub. ### Description In my global config I have: ```json "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: ```json "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
yindo added the bug label 2026-02-16 17:37:17 -05:00
yindo closed this issue 2026-02-16 17:37:17 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 11, 2025):

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

  • #3895: Similar issue with built-in agent overrides not fully applying - metadata and configuration don't propagate correctly
  • #3575: Bug where overriding built-in agents doesn't allow overriding permissions - the original agent behavior takes precedence over custom configurations

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

@github-actions[bot] commented on GitHub (Nov 11, 2025): This issue might be a duplicate of existing issues. Please check: - #3895: Similar issue with built-in agent overrides not fully applying - metadata and configuration don't propagate correctly - #3575: Bug where overriding built-in agents doesn't allow overriding permissions - the original agent behavior takes precedence over custom configurations Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2793