fix: hide native plan agent when replace_plan is true (#3443)

When replace_plan is true (default), the native plan agent was demoted to
subagent but remained visible in the agent picker. This caused Sisyphus to
route planning to the native plan agent instead of Prometheus.

Add hidden: true to buildPlanDemoteConfig(), consistent with how the build
agent is hidden when default_builder_enabled is false.
This commit is contained in:
YeonGyu-Kim
2026-04-15 17:04:54 +09:00
parent 9aeb87c25f
commit ccb2715ada
4 changed files with 33 additions and 26 deletions
@@ -11,7 +11,7 @@ describe("buildPlanDemoteConfig", () => {
const result = buildPlanDemoteConfig(prometheusConfig, planOverride)
//#then
expect(result).toEqual({ mode: "subagent" })
expect(result).toEqual({ mode: "subagent", hidden: true })
})
test("extracts all model settings from prometheus config", () => {
@@ -112,7 +112,7 @@ describe("buildPlanDemoteConfig", () => {
const result = buildPlanDemoteConfig(prometheusConfig, undefined)
//#then
expect(result).toEqual({ mode: "subagent", model: "anthropic/claude-opus-4-6" })
expect(Object.keys(result)).toEqual(["mode", "model"])
expect(result).toEqual({ mode: "subagent", hidden: true, model: "anthropic/claude-opus-4-6" })
expect(Object.keys(result)).toEqual(["mode", "hidden", "model"])
})
})
@@ -23,5 +23,5 @@ export function buildPlanDemoteConfig(
}
}
return { mode: "subagent" as const, ...modelSettings }
return { mode: "subagent" as const, hidden: true, ...modelSettings }
}