Skip to content

[FEATURE]: Managed settings with admin-controlled priority for enterprise #6358

Closed

Description

@Mishkun

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Problem

Organizations deploying OpenCode to teams need a way to enforce certain settings that users cannot override. Currently, there's no mechanism for administrators to set high-priority configurations that take precedence over user/project settings.

E.g. claude code solves this with /Library/Application Support/ClaudeCode/managed-settings.json - a system-level config file that can be deployed by admins and takes precendence over user rules

Usecases for managed settings

  • configuring company-wide approved providers and models
  • disabling share functionality to comply with cybersec rules
  • disabling autoupdate

Proposed Solution

Add support for a managed settings file, taking precedence over user settings. Meaning that configs will be applied in this priority:

  1. Managed settings (admin-controlled, read-only for users)
    • macOS: /Library/Application Support/opencode/managed-settings.json
    • Linux: /etc/opencode/managed-settings.json
    • Windows: %ProgramData%\opencode\managed-settings.json
  2. Project settings (./opencode.json)
  3. User settings (~/.config/opencode/config.json)

That way the config will override the user provided settings

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Dec 29, 2025
  2. github-actions commented on Dec 29, 2025

    @github-actions
    Contributor

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

    Your feature request is more comprehensive as it proposes a hierarchical configuration system with admin-controlled overrides, which goes beyond these individual issues. Feel free to ignore if this specifically addresses a different use case.

  3. thdxr commented on Dec 30, 2025

    @thdxr
    Member

    yep this was on my list

    btw curious at your organization what is the mechanism to distribute that file?

  4. Mishkun commented on Dec 30, 2025

    @Mishkun
    ContributorAuthor

    btw curious at your organization what is the mechanism to distribute that file?

    I believe for macs they use jamf. I'll check and come back

  5. Mishkun commented on Dec 30, 2025

    @Mishkun
    ContributorAuthor

    @thdxr yep, they use jamf to put these files, but this doesn't protect them from being changed by end user really. It is a feasible workaround, but other software is managed by reading userdefaults

  6. Mishkun commented on Dec 30, 2025

    @Mishkun
    ContributorAuthor

    yep this was on my list

    mind if I submit a pr?

  7. mrw commented on Jan 1, 2026

    @mrw

    Thanks for doing this @Mishkun! It's definitely somewhat helpful to add this to /Library/Application Support/opencode/managed-settings.json, as you're doing in a5479a80588baaf9451254fc71fa59929ea58e24, but I want to echo your point above:

    other software is managed by reading userdefaults

    End users are going to be able to edit the managed-settings.json file, but can't edit MDM-enforced userdefaults settings, which should always take precedence.

    @thdxr, regarding your question, we also use Jamf but every MDM out there (Jamf, Mosyle, Kandji, etc...) supports distributing preference overrides in this way. For reference, here's how VS Code handles this: https://code.visualstudio.com/docs/setup/enterprise#_centrally-manage-vs-code-settings

    They allow MDM-controlled preference files to override any other settings. For example, here's how it works on macs: https://code.visualstudio.com/docs/setup/enterprise#_configuration-profiles-on-macos

    That plist file format (for Macs) or group policy (for Windows) itself isn't something super complex for admins, this is very common and how other software is configured on MDM settings also.

    I appreciate your consideration of this! It's definitely very important for us to be able to roll this out more broadly within our company.

  8. scottrbaxter commented on Jan 6, 2026

    @scottrbaxter

    Not sure if this is being considered yet, but i don't see it mentioned anywhere above.

    Following other standard practice solutions out there (i like to use Ansible as an example, since it's quite granular), the OPENCODE_CONFIG env var should take priority over flat files.

    https://opencode.ai/docs/config/#custom-path

  9. paraddise commented on Jan 12, 2026

    @paraddise

    AFAIK to use user defaults we need to have bundle id, otherwise macos won't be able to find our settings. But I think creating application bundle and sign it for macos is a greate improvement in quality of the product. Signed apps seem more secure and can be used in some companies with restrictions to use only signed apps.

  10. paraddise commented on Jan 15, 2026

    @paraddise

    Also, I have to mention that it is hard to manage a file on Windows and it is better to use the registry for settings. As an administrator, you can manage registry values for the computer.

  11. added a commit that references this issue on Jan 29, 2026
    6142d8f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussion

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions