GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(core): a switch that turns every feature flag on by kitlangton · Pull Request #61826 · anomalyco/opencode

Conversation

@kitlangton

@kitlangton kitlangton commented Nov 4, 2026 •
edited by opencodejr Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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.

All reactions
@github-actions github-actions Bot added the contributor label Nov 4, 2026
@kitlangton
kitlangton force-pushed the flag-all-on branch 2 times, most recently from 8cf6bc6 to d877c86 Compare November 4, 2026 23:26
@kitlangton
kitlangton force-pushed the flag-registry branch from 621396b to 4dbe775 Compare November 5, 2026 02:34
@kitlangton
kitlangton force-pushed the flag-all-on branch from d877c86 to 062cb4b Compare November 5, 2026 02:40
@kitlangton
kitlangton marked this pull request as ready for review November 5, 2026 02:41
Base automatically changed from flag-registry to dev November 5, 2026 02:52
kitlangton added 2 commits November 4, 2026 18:52
@kitlangton
feat(core): add an everything-on switch for feature flags
f188fcf
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.
@kitlangton
test(core): cover the everything-on switch in fewer, whole-table cases
7e90971
@kitlangton
kitlangton force-pushed the flag-all-on branch from 062cb4b to 7e90971 Compare November 5, 2026 02:53
opencodejr[bot]
opencodejr Bot reviewed Nov 5, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

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.

All reactions
Comment thread packages/core/src/flag.ts
.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")

@opencodejr opencodejr Bot Nov 5, 2026

Copy link
Copy Markdown
Contributor

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.

All reactions
opencodejr[bot]
opencodejr Bot reviewed Nov 5, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

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.

All reactions
@kitlangton
fix(core): read all_flags from the config that sets it, so a global s…
b56bcc6
…witch survives a project's experimental block
opencodejr[bot]
opencodejr Bot reviewed Nov 5, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

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.

All reactions
@kitlangton
kitlangton merged commit aff4323 into dev Nov 5, 2026
20 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@kitlangton
kitlangton deleted the flag-all-on branch November 5, 2026 03:13
@amrkmn amrkmn mentioned this pull request Nov 7, 2026
opencode 2.2.6 amrkmn/homebrew-tap#1217
Closed
1 task
This was referenced Nov 7, 2026
feat: opencode release v2.2.6 sprisa/opencode-server#84
Merged
Tool release: OpenCode 2 v2.2.6 (was v2.2.5) agent-sh/agnix#1808
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@opencodejr opencodejr[bot] opencodejr[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

contributor

Projects

None yet

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.

1 participant

@kitlangton
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.