[FEATURE]: Expose set flags using configuration #3481

Open
opened 2026-02-16 17:40:17 -05:00 by yindo · 1 comment
Owner

Originally created by @hosseinalipour on GitHub (Dec 11, 2025).

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

Several useful options are only available as environment variables (defined in flag.ts).

I wish if These would be configurable via opencode.json for better discoverability and easier management without needing to set environment variables, or even better, to be configurable in the agent level too.
I would be interested to submit a PR for this.

Proposed:
{
flags: {
disable_prune: false,
disable_autocompact: false,
disable_autoupdate: false,
enable_exa: true
}
}

Originally created by @hosseinalipour on GitHub (Dec 11, 2025). ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request Several useful options are only available as environment variables (defined in [flag.ts](https://github.com/sst/opencode/blob/v1.0.150/packages/opencode/src/flag/flag.ts)). I wish if These would be configurable via opencode.json for better discoverability and easier management without needing to set environment variables, or even better, to be configurable in the agent level too. I would be interested to submit a PR for this. Proposed: { flags: { disable_prune: false, disable_autocompact: false, disable_autoupdate: false, enable_exa: true } }
yindo added the discussion label 2026-02-16 17:40:17 -05:00
Author
Owner

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

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

  • #3011: [Feature Request] Configurable Retry Mechanism via opencode.json - similar request to make environment-variable options configurable via opencode.json
  • #4702: [FEATURE]: Add config to change shell for bash tool - requests configuring shell options via config file instead of environment variables
  • #4683: [FEATURE]: allow multiple shell setups and allow switching them at runtime via TUI command - related approach to exposing environment-variable options through configuration

All these issues share the same pattern of requesting that environment-variable-based options be made configurable through opencode.json. Feel free to ignore if your specific case differs from these.

@github-actions[bot] commented on GitHub (Dec 11, 2025): This issue might be a duplicate of existing issues. Please check: - #3011: [Feature Request] Configurable Retry Mechanism via opencode.json - similar request to make environment-variable options configurable via opencode.json - #4702: [FEATURE]: Add config to change shell for bash tool - requests configuring shell options via config file instead of environment variables - #4683: [FEATURE]: allow multiple shell setups and allow switching them at runtime via TUI command - related approach to exposing environment-variable options through configuration All these issues share the same pattern of requesting that environment-variable-based options be made configurable through opencode.json. Feel free to ignore if your specific case differs from these.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3481