Skip to content

v2 regression: OPENCODE_CONFIG environment variable is ignored #48853

Closed as duplicate

Description

@EpicEric

Description

There is a regression from v1 to v2 where the environment variable OPENCODE_CONFIG is no longer used to look up the configuration.

Previously, you could point it to a path containing the configuration file: https://opencode.ai/docs/config/#custom-path

According to the v2 docs, this is to be treated as a compatibility bug: https://opencode.ai/v2/docs/migrate-v1/#breaking-changes

Plugins

N/A

OpenCode version

v2.0.3

Steps to reproduce

  1. Upgrade to v2
  2. Run OPENCODE_CONFIG=/some/path/to/config.json opencode
  3. Settings are not loaded from /some/path/to/config.json

Screenshot and/or share link

N/A

Operating System

NixOS 26.11-unstable

Terminal

Kitty

Activity

  1. github-actions commented on Sep 13, 2026

    @github-actions
    Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions