Skip to content

feat(cli): enable shared agent board via experimental env flag - #14013

Merged
marius-kilocode merged 1 commit into
mainfrom
kilo-swarm-env-flag
Sep 10, 2026
Merged

marius-kilocode merged 1 commit into
mainfrom
kilo-swarm-env-flag

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Kilo Swarm (the experimental shared agent board) could only be turned on through the experimental.shared_agent_board config key. Users who opt into experiments globally with KILO_EXPERIMENTAL=true, or who want to toggle the board through one environment variable, had no way to enable it without editing config.

Why This Change Was Made

  • Add experimentalSharedAgentBoard to the central runtime flags with enabledByExperimental("KILO_EXPERIMENTAL_SHARED_AGENT_BOARD"), so the specific variable and the KILO_EXPERIMENTAL umbrella both work.
  • Add a BoardEnabled.resolve helper under packages/opencode/src/kilocode/board/ and route every existing gate (board tools, board notifier, agent permissions, tool registry, session tool notify wiring) through it, instead of scattering new || flag checks.
  • Resolution rule: the board is enabled when config is true or the flag is true. An explicit config false does not disable the board when the flag is set, because the environment variable is an additional enable path. The config key remains the source of truth for an explicit true.
  • Shared upstream files only change where the RuntimeFlags service must be threaded through, and those lines sit inside existing kilocode_change regions.

User Impact

Setting KILO_EXPERIMENTAL_SHARED_AGENT_BOARD=true, or the umbrella KILO_EXPERIMENTAL=true, enables board_read and board_post without changing config. Existing config based enablement and the default disabled state are unchanged. Tool names, stored IDs, migrations, history, and permissions are untouched.

Evidence

  • bun run typecheck from packages/opencode/: exit 0.
  • bun test ./test/kilocode/board-enabled.test.ts ./test/kilocode/board-tools.test.ts ./test/kilocode/board-context.test.ts: 26 pass, 0 fail.
  • bun test ./test/kilocode/tool-registry-indexing.test.ts ./test/kilocode/chart-tool-gating.test.ts ./test/kilocode/notebook-tools.test.ts ./test/kilocode/tool/memory-save.test.ts ./test/kilocode/tool/send-file.test.ts ./test/kilocode/system-prompt.test.ts: 71 pass, 0 fail.
  • bun test ./test/kilocode/board-live.test.ts ./test/kilocode/server/board.test.ts ./test/kilocode/board/store.test.ts: 34 pass, 0 fail.
  • bun test ./test/effect/runtime-flags.test.ts ./test/tool/registry.test.ts: 58 pass, 0 fail.
  • bun run script/check-opencode-annotations.ts --worktree: all shared upstream changes are annotated with kilocode_change markers.

Adds a patch changeset.

Kilo Swarm was gated only by the experimental.shared_agent_board config key. Add the KILO_EXPERIMENTAL_SHARED_AGENT_BOARD runtime flag, and the KILO_EXPERIMENTAL umbrella, as an additional enable path.

Introduce a BoardEnabled.resolve helper so every gate site shares one rule: config true or flag true. An explicit config false does not disable the board when the flag is set.
@kilo-code-bot

kilo-code-bot Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (20 files)
  • .changeset/board-env-flag.md
  • packages/opencode/src/agent/agent.ts
  • packages/opencode/src/effect/runtime-flags.ts
  • packages/opencode/src/kilocode/agent/index.ts
  • packages/opencode/src/kilocode/board/context.ts
  • packages/opencode/src/kilocode/board/enabled.ts
  • packages/opencode/src/kilocode/tool/board.ts
  • packages/opencode/src/kilocode/tool/registry.ts
  • packages/opencode/src/session/prompt.ts
  • packages/opencode/src/session/tools.ts
  • packages/opencode/src/tool/registry.ts
  • packages/opencode/test/kilocode/board-context.test.ts
  • packages/opencode/test/kilocode/board-enabled.test.ts
  • packages/opencode/test/kilocode/board-tools.test.ts
  • packages/opencode/test/kilocode/chart-tool-gating.test.ts
  • packages/opencode/test/kilocode/notebook-tools.test.ts
  • packages/opencode/test/kilocode/system-prompt.test.ts
  • packages/opencode/test/kilocode/tool-registry-indexing.test.ts
  • packages/opencode/test/kilocode/tool/memory-save.test.ts
  • packages/opencode/test/kilocode/tool/send-file.test.ts

Reviewed by grok-4.6 · Input: 234K · Output: 14.6K · Cached: 581.8K

Review guidance: REVIEW.md from base branch main

@maxdata
maxdata self-requested a review September 10, 2026 17:21
@marius-kilocode
marius-kilocode merged commit 7f93475 into main Sep 10, 2026
32 checks passed
@marius-kilocode
marius-kilocode deleted the kilo-swarm-env-flag branch September 10, 2026 17:23
Le0xFF pushed a commit to Le0xFF/kilocode that referenced this pull request Sep 18, 2026
Merge origin/main (3d04228, release v7.6.2) on top of the v7.6.0 sync:
streaming frame-cadence perf, todo/bash/diff render perf, inline @model
references (Kilo-Org#14006), question dialog keybindings, KILO_SWARM env flag
(Kilo-Org#14013), exclude-permission-wait-duration, subagent avatar color scoping,
release bumps to 7.6.2.

Offline invariants kept: pruned packages stay deleted; providers hard-cut
to local surface (no kilo-gateway/telemetry); ModelSelector gateway refs
stripped with isAuto/isSmall/autoSummary stubbed off; telemetry feedback
controls dropped from TranscriptRow; i18n locales take-ours + new
model.group.auto/recommended keys added in all 21 locales.

Board default: shared agent board stays OFF by default — no gateway
dependency (local DB-backed), reachable via experimental.shared_agent_board
config or KILO_EXPERIMENTAL_SHARED_AGENT_BOARD env flag only.
Rejected online-only features: veil-intelligence cloud analytics hooks,
profile-worktree-deletion-time (cloud profile worktree deletion), swarm
endpoint calls.
Le0xFF added a commit to Le0xFF/kilocode that referenced this pull request Sep 18, 2026
Merge origin/main (3d04228, release v7.6.2) on top of the v7.6.0 sync:
streaming frame-cadence perf, todo/bash/diff render perf, inline @model
references (Kilo-Org#14006), question dialog keybindings, KILO_SWARM env flag
(Kilo-Org#14013), exclude-permission-wait-duration, subagent avatar color scoping,
release bumps to 7.6.2.

Offline invariants kept: pruned packages stay deleted; providers hard-cut
to local surface (no kilo-gateway/telemetry); ModelSelector gateway refs
stripped with isAuto/isSmall/autoSummary stubbed off; telemetry feedback
controls dropped from TranscriptRow; i18n locales take-ours + new
model.group.auto/recommended keys added in all 21 locales.

Board default: shared agent board stays OFF by default — no gateway
dependency (local DB-backed), reachable via experimental.shared_agent_board
config or KILO_EXPERIMENTAL_SHARED_AGENT_BOARD env flag only.
Rejected online-only features: veil-intelligence cloud analytics hooks,
profile-worktree-deletion-time (cloud profile worktree deletion), swarm
endpoint calls.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants