GeezerVison is showing github.com — feat(core): a switch that turns every feature flag on by kitlangton · Pull Request #61826 · anomalyco/opencode
Conversation
kitlangton
commented
Nov 4, 2026
•
edited by opencodejr
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
One switch turns every feature flag on, on any build, so people on a released build can try everything on their own machine.
Follows the flag registry (#61825, merged).
💡 Why
Flags are on in local and dev builds only. Someone running a released build had to list every flag by name to try them.
🆕 Now you can
- Set
OPENCODE_FLAGS=all to turn every flag on; all,-media_blob still leaves one off.
- Or set
experimental.all_flags: true in config; a specific experimental.<key>: false still wins, and all_flags: false does nothing (it isn't a kill switch).
AGENTS.md now asks the agent opening a PR to decide whether the change needs a flag, and to name the flag in the PR body.
override = env[key]
+ ?? (env has "all" ? true : undefined)
configured = experimental[key]
+ ?? (experimental.all_flags ? true : undefined)
Neither all nor all_flags is a flag key, so the flag list is unchanged.
👀 Read: resolve in packages/core/src/flag.ts: the ordering is env (-key, then all), then config (<key>, then all_flags), then the local/dev default. The rest is routine.
Checks run
packages/core: bun run script/test.ts test/flag.test.ts test/config/normalization.test.ts test/plugin/internal-flag.test.ts: 54 pass
packages/schema: bun test: 92 pass
bun typecheck across all packages (pre-push): no errors
Added by the opencode bot (AI-generated).
Public API: adds experimental.all_flags config key and OPENCODE_FLAGS=all (backwards compatible)
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
OPENCODE_FLAGS=all or experimental.all_flags: true turns every registered flag on in any build, while an explicit -key or experimental.<key>: false still wins. AGENTS.md now asks the agent opening a PR to decide whether the change needs a flag and to name it in the PR body.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change works as described. With the build channel set to latest, a copy of the built-in plugin test registers todowrite with OPENCODE_FLAGS=all and todo, and leaves it out with nothing set or with all,-todo. The experimental.all_flags path is covered only by the Flag.resolve unit tests: I couldn't load a project config end to end here. Tests in core and schema pass, and tsc passes for both packages.
Public API (all backwards compatible; the diff includes the stacked flag registry commits):
- Adds the config key
experimental.all_flags (boolean) to the schema, the OpenAPI spec and the generated client types. schedules and artifacts only move position in the spec.
- Adds the environment variable
OPENCODE_FLAGS (key, -key, all).
- Changes the defaults of
experimental.todo, background_compaction, media_blob, schedules and artifacts from off to on in local and dev builds; releases stay off. Existing configs keep working.
One design point is noted inline: all_flags set in the global config is ignored as soon as a project sets any experimental key.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
.map((item): [string, boolean] => (item.startsWith("-") ? [item.slice(1), false] : [item, true])),
|
|
|
)
|
|
|
const all = env.get(ConfigFlag.wildcard) === true
|
|
|
const experimental = Config.latest(input.entries, "experimental")
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because all_flags comes from Config.latest(..., "experimental"), setting all_flags: true once in the global config stops working as soon as a project config has any experimental block, for example only subagent_depth: 2. Every flag then quietly falls back to its default. That matches how the other experimental.* settings behave, and the test covers it as intended. Still, the README pitches this as a switch to set once on your own machine, so it's an easy trap. Could all_flags be read from the highest-priority document that actually sets all_flags instead?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This push is a rebase onto dev after #61825 merged; the two commits in this PR are unchanged, so my earlier check still applies. The core flag, config normalization and built-in plugin tests, the schema tests and the packages/core type check all pass on the new head. The earlier point about all_flags in the global config being ignored when a project sets any experimental key is still open. Nothing new to raise.
Public API (with the registry already on dev): adds the config key experimental.all_flags (boolean), in the OpenAPI spec and the generated client types, and the all value for OPENCODE_FLAGS. Both are backwards compatible.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…witch survives a project's experimental block
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new commit fixes the earlier thread: all_flags now comes from the highest-priority document that sets it, so a global all_flags: true holds when a project has its own experimental block. A project-level all_flags: false cancels it back to the defaults, and the updated test covers both cases. The core flag, config normalization and built-in plugin tests pass, and the packages/core type check is clean. This commit doesn't change the public API, and I have no new concerns.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 7, 2026
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|