Skip to content

feat(tui): move some experimental keys from config to ENV as well - #11216

Closed
IdrisGit wants to merge 12 commits into
anomalyco:devfrom
IdrisGit:feat-move-some-experimental-config-to-env-as-well
Closed

feat(tui): move some experimental keys from config to ENV as well#11216
IdrisGit wants to merge 12 commits into
anomalyco:devfrom
IdrisGit:feat-move-some-experimental-config-to-env-as-well

Conversation

@IdrisGit

Copy link
Copy Markdown
Contributor

Motivation

currently there are two ways to enable experimental features in OpenCode, one via the config file and another using ENV variables, there are some features which can only be enabled via config right now but those are not documented anywhere in the docs, however ENV based experimental feature toggle is documented well enough.

What does this PR do?

migrates these feature flags: disable_paste_summary, batch_tool, openTelemetry, continue_loop_on_deny and mcp_timeout to the ENV based feature flags as well, with config values getting priority over ENV for compatibility.

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@ariane-emory

ariane-emory commented Jan 30, 2026

Copy link
Copy Markdown
Contributor

Personally, I think that it would feel more natural to me if the priority worked the other way around, allowing the environment variable flags be used ad-hoc to temporarily override the values specified in my configuration file. I'm sure the opinions on this will vary, though.

opencode and others added 3 commits January 30, 2026 06:48
…ng sent back as assistant message content (anomalyco#11270)

Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
@IdrisGit

Copy link
Copy Markdown
Contributor Author

Personally, I think that it would feel more natural to me if the priority worked the other way around, allowing the environment variable flags be used ad-hoc to temporarily override the values specified in my configuration file. I'm sure the opinions on this will vary, though.

Yes that makes sense, but the issue here is that not all feature flags are available in either system, in this PR I am just trying to sync up the undocumented flags in config.experimental with ENV bases system.

The reason to give config priority over ENV is just for backwards compatibility for those flags, currently there is no override system in place, allowing ENV to take precedence over config means some flags does and some doesn't override.

Long term I think once the system is standarized, it makes sense to give ENV precedence over the config.

@ariane-emory

ariane-emory commented Jan 30, 2026

Copy link
Copy Markdown
Contributor

@IdrisGit Alright. To me, it seems that we could potentially take care of both sides of it in one fell swoop: make all the experimental options available through either environment variables or configuration settings, and make the environment variables always take priority, getting the whole job done and making the behaviour both consistent and flexible in one shot.

You've likely thought this issue through more deeply than I have yet, though, so I'm sure that you have good reason for taking a more conservative approach and I will happily defer to your wisdom here.

@IdrisGit

Copy link
Copy Markdown
Contributor Author

@ariane-emory yeah I was thinking about working on later, I created this PR adhoc when I was talking to someone on discord and found this issue, it was confirmed by Aiden as well that there is discrepancy, so plan with this PR is just to sync that up.

I need to think about it abit, before I create a PR on that issue, till then syncing should do.

opencode-agent Bot added a commit that referenced this pull request Jan 30, 2026
opencode-agent Bot added a commit that referenced this pull request Jan 30, 2026
opencode-agent Bot added a commit that referenced this pull request Jan 30, 2026
opencode-agent Bot added a commit that referenced this pull request Jan 31, 2026
opencode-agent Bot added a commit that referenced this pull request Jan 31, 2026
opencode-agent Bot added a commit that referenced this pull request Jan 31, 2026
opencode-agent Bot added a commit that referenced this pull request Jan 31, 2026
opencode-agent Bot added a commit that referenced this pull request Jan 31, 2026
opencode-agent Bot added a commit that referenced this pull request Jan 31, 2026
opencode-agent Bot added a commit that referenced this pull request Jan 31, 2026
opencode-agent Bot added a commit that referenced this pull request Jan 31, 2026
opencode-agent Bot added a commit that referenced this pull request Jan 31, 2026
@github-actions

github-actions Bot commented Apr 4, 2026

Copy link
Copy Markdown
Contributor

Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR.

@github-actions github-actions Bot closed this Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment