Skip to content

fix(cli): remove vestigial KILO_EXPERIMENTAL_PLAN_MODE flag - #14283

Merged
marius-kilocode merged 3 commits into
mainfrom
remove-experimental-plan-mode-flag
Sep 18, 2026
Merged

marius-kilocode merged 3 commits into
mainfrom
remove-experimental-plan-mode-flag

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

What Problem This Solves

KILO_EXPERIMENTAL_PLAN_MODE no longer gates plan mode. Plan mode is already the default: planning() and insertPlanReminders run for the plan and architect agents unconditionally, and plan_exit / plan_enter are registered unconditionally. The flag only controlled the Plan to Code handoff reminder, so it looked like a feature switch while doing almost nothing.

Why This Change Was Made

Upstream opencode enabled plan mode by default and removed its OPENCODE_EXPERIMENTAL_PLAN_MODE flag (b2121c963fe, afec40e8dab). Kilo kept the flag through the KILO_ rename. This removes the flag and the dead branch it guarded, keeping the upstream default behavior: when switching from a planning agent to Code, append the CODE_SWITCH reminder and, when the plan file exists, the saved plan path hint.

User Impact

  • KILO_EXPERIMENTAL_PLAN_MODE is no longer read. Setting it has no effect.
  • Switching from Plan to Code now always includes the saved plan file hint when a plan file exists. Previously that hint was emitted only when the flag was enabled, so the default path omitted it.

Evidence

  • bun test ./test/kilocode/reminders-separator.test.ts ./test/effect/runtime-flags.test.ts from packages/opencode: 41 pass, 0 fail.
  • bun run typecheck from packages/opencode: exit 0.

Plan mode already runs unconditionally, so the flag only gated the Plan
to Code handoff reminder. Keep the upstream default behavior: always
append the saved plan file hint when switching from a planning agent to
Code.
Comment thread packages/opencode/src/session/reminders.ts Outdated
@kilo-code-bot

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

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • packages/opencode/src/session/reminders.ts
  • packages/opencode/test/kilocode/reminders-separator.test.ts
Previous Review Summary (commit 18c0384)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 18c0384)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
packages/opencode/src/session/reminders.ts 40 Removing the flag early-return makes the Plan-to-Code CODE_SWITCH reminder fire for every non-plan target, including read-only ask, debug, orchestrator, and planning architect modes; previously it was gated on agent.name === "code".
Files Reviewed (7 files)
  • .changeset/remove-experimental-plan-mode-flag.md - 0 issues
  • packages/core/src/flag/flag.ts - 0 issues
  • packages/kilo-vscode/docs/cli-side/plan-mode-over-prompting.md - 0 issues
  • packages/opencode/src/effect/runtime-flags.ts - 0 issues
  • packages/opencode/src/session/reminders.ts - 1 issue
  • packages/opencode/test/effect/runtime-flags.test.ts - 0 issues
  • packages/opencode/test/kilocode/reminders-separator.test.ts - 0 issues

Fix these issues in Kilo Cloud


Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

Append the CODE_SWITCH reminder only when entering the code agent from a
planning agent (plan or architect). The broad non-plan check fired for
read-only and other agents once the flag gate was removed.
@WebReflection

Copy link
Copy Markdown
Contributor

@marius-kilocode I am afraid there are conflicts but otherwise looks good to me

@marius-kilocode

Copy link
Copy Markdown
Collaborator Author

No problem:
image

…xperimental-plan-mode-flag

# Conflicts:
#	packages/opencode/src/session/reminders.ts
#	packages/opencode/test/kilocode/reminders-separator.test.ts
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