From 0553676ab08131ede34a62846c1de7929e368fd6 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Mon, 5 Jan 2026 09:26:42 +0900 Subject: [PATCH] fix: use mode 'all' for Planner-Sisyphus agent and inherit default model MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with assistance of OhMyOpenCode - Fix Planner-Sisyphus agent config: use `mode: 'all'` instead of `mode: 'primary'` to show in Tab selector - Use model fallback to default config model when plan agent model not specified - Demote original plan agent to `subagent` mode with `hidden: true` instead of `disable: true` - Destructure `mode` from plan config to avoid passing it to migratedPlanConfig --- src/plugin-handlers/config-handler.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/plugin-handlers/config-handler.ts b/src/plugin-handlers/config-handler.ts index ddc33f1..b4e57c4 100644 --- a/src/plugin-handlers/config-handler.ts +++ b/src/plugin-handlers/config-handler.ts @@ -168,16 +168,17 @@ export function createConfigHandler(deps: ConfigHandlerDeps) { } if (plannerEnabled) { - const { name: _planName, ...planConfigWithoutName } = + const { name: _planName, mode: _planMode, ...planConfigWithoutName } = configAgent?.plan ?? {}; const migratedPlanConfig = migrateAgentConfig( planConfigWithoutName as Record ); const plannerSisyphusOverride = pluginConfig.agents?.["Planner-Sisyphus"]; + const defaultModel = config.model as string | undefined; const plannerSisyphusBase = { - ...migratedPlanConfig, - mode: "primary", + model: (migratedPlanConfig as Record).model ?? defaultModel, + mode: "all" as const, prompt: PLAN_SYSTEM_PROMPT, permission: PLAN_PERMISSION, description: `${configAgent?.plan?.description ?? "Plan agent"} (OhMyOpenCode version)`, @@ -209,7 +210,7 @@ export function createConfigHandler(deps: ConfigHandlerDeps) { : {}; const planDemoteConfig = replacePlan - ? { disable: true } + ? { mode: "subagent" as const, hidden: true } : undefined; config.agent = {