Skip to content

Conversation

@IdrisGit
Copy link
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
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
Contributor

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

No duplicate PRs found

@ariane-emory
Copy link
Contributor

ariane-emory commented Jan 30, 2026

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
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
Copy link
Contributor

ariane-emory commented Jan 30, 2026

@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
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.

@thdxr thdxr force-pushed the dev branch 4 times, most recently from f1ae801 to 08fa7f7 Compare January 30, 2026 14:37
thdxr 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 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 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 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 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 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
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants