fix(config): revert task_system default to false to avoid breaking change

This commit is contained in:
YeonGyu-Kim
2026-04-01 18:20:05 -07:00
parent 51d9685571
commit 624a6becc7
4 changed files with 71 additions and 60 deletions
+1 -1
View File
@@ -90,7 +90,7 @@ export async function applyAgentConfig(params: {
params.pluginConfig.browser_automation_engine?.provider ?? "playwright";
const currentModel = params.config.model as string | undefined;
const disabledSkills = new Set<string>(params.pluginConfig.disabled_skills ?? []);
const useTaskSystem = params.pluginConfig.experimental?.task_system ?? true;
const useTaskSystem = params.pluginConfig.experimental?.task_system ?? false;
const disableOmoEnv = params.pluginConfig.experimental?.disable_omo_env ?? false;
const includeClaudeAgents = params.pluginConfig.claude_code?.agents ?? true;
+66 -55
View File
@@ -20,6 +20,17 @@ import * as configDir from "../shared/opencode-config-dir"
import * as permissionCompat from "../shared/permission-compat"
import * as modelResolver from "../shared/model-resolver"
function createPluginConfig(overrides: Partial<OhMyOpenCodeConfig> = {}): OhMyOpenCodeConfig {
return {
git_master: {
commit_footer: true,
include_co_authored_by: true,
git_env_prefix: "GIT_MASTER=1",
},
...overrides,
}
}
beforeEach(() => {
spyOn(agents, "createBuiltinAgents" as any).mockResolvedValue({
sisyphus: { name: "sisyphus", prompt: "test", mode: "primary" },
@@ -105,7 +116,7 @@ afterEach(() => {
describe("Sisyphus-Junior model inheritance", () => {
test("does not inherit UI-selected model as system default", async () => {
// #given
const pluginConfig: OhMyOpenCodeConfig = {}
const pluginConfig = createPluginConfig({})
const config: Record<string, unknown> = {
model: "opencode/kimi-k2.5-free",
agent: {},
@@ -131,13 +142,13 @@ describe("Sisyphus-Junior model inheritance", () => {
test("uses explicitly configured sisyphus-junior model", async () => {
// #given
const pluginConfig: OhMyOpenCodeConfig = {
const pluginConfig = createPluginConfig({
agents: {
"sisyphus-junior": {
model: "openai/gpt-5.3-codex",
},
},
}
})
const config: Record<string, unknown> = {
model: "opencode/kimi-k2.5-free",
agent: {},
@@ -174,11 +185,11 @@ describe("Plan agent demote behavior", () => {
oracle: { name: "oracle", prompt: "test", mode: "subagent" },
atlas: { name: "atlas", prompt: "test", mode: "primary" },
})
const pluginConfig: OhMyOpenCodeConfig = {
const pluginConfig = createPluginConfig({
sisyphus_agent: {
planner_enabled: true,
},
}
})
const config: Record<string, unknown> = {
model: "anthropic/claude-opus-4-6",
agent: {},
@@ -209,12 +220,12 @@ describe("Plan agent demote behavior", () => {
test("plan agent should be demoted to subagent without inheriting prometheus prompt", async () => {
// #given
const pluginConfig: OhMyOpenCodeConfig = {
const pluginConfig = createPluginConfig({
sisyphus_agent: {
planner_enabled: true,
replace_plan: true,
},
}
})
const config: Record<string, unknown> = {
model: "anthropic/claude-opus-4-6",
agent: {
@@ -247,11 +258,11 @@ describe("Plan agent demote behavior", () => {
test("plan agent remains unchanged when planner is disabled", async () => {
// #given
const pluginConfig: OhMyOpenCodeConfig = {
const pluginConfig = createPluginConfig({
sisyphus_agent: {
planner_enabled: false,
},
}
})
const config: Record<string, unknown> = {
model: "anthropic/claude-opus-4-6",
agent: {
@@ -284,11 +295,11 @@ describe("Plan agent demote behavior", () => {
test("prometheus should have mode 'all' to be callable via task", async () => {
// given
const pluginConfig: OhMyOpenCodeConfig = {
const pluginConfig = createPluginConfig({
sisyphus_agent: {
planner_enabled: true,
},
}
})
const config: Record<string, unknown> = {
model: "anthropic/claude-opus-4-6",
agent: {},
@@ -324,7 +335,7 @@ describe("Agent permission defaults", () => {
hephaestus: { name: "hephaestus", prompt: "test", mode: "primary" },
oracle: { name: "oracle", prompt: "test", mode: "subagent" },
})
const pluginConfig: OhMyOpenCodeConfig = {}
const pluginConfig = createPluginConfig({})
const config: Record<string, unknown> = {
model: "anthropic/claude-opus-4-6",
agent: {},
@@ -352,7 +363,7 @@ describe("Agent permission defaults", () => {
describe("default_agent behavior with Sisyphus orchestration", () => {
test("canonicalizes configured default_agent with surrounding whitespace", async () => {
// given
const pluginConfig: OhMyOpenCodeConfig = {}
const pluginConfig = createPluginConfig({})
const config: Record<string, unknown> = {
model: "anthropic/claude-opus-4-6",
default_agent: " hephaestus ",
@@ -376,7 +387,7 @@ describe("default_agent behavior with Sisyphus orchestration", () => {
test("canonicalizes configured default_agent when key uses mixed case", async () => {
// given
const pluginConfig: OhMyOpenCodeConfig = {}
const pluginConfig = createPluginConfig({})
const config: Record<string, unknown> = {
model: "anthropic/claude-opus-4-6",
default_agent: "HePhAeStUs",
@@ -400,7 +411,7 @@ describe("default_agent behavior with Sisyphus orchestration", () => {
test("canonicalizes configured default_agent key to display name", async () => {
// #given
const pluginConfig: OhMyOpenCodeConfig = {}
const pluginConfig = createPluginConfig({})
const config: Record<string, unknown> = {
model: "anthropic/claude-opus-4-6",
default_agent: "hephaestus",
@@ -424,7 +435,7 @@ describe("default_agent behavior with Sisyphus orchestration", () => {
test("preserves existing display-name default_agent", async () => {
// #given
const pluginConfig: OhMyOpenCodeConfig = {}
const pluginConfig = createPluginConfig({})
const displayName = getAgentDisplayName("hephaestus")
const config: Record<string, unknown> = {
model: "anthropic/claude-opus-4-6",
@@ -449,7 +460,7 @@ describe("default_agent behavior with Sisyphus orchestration", () => {
test("sets default_agent to sisyphus when missing", async () => {
// #given
const pluginConfig: OhMyOpenCodeConfig = {}
const pluginConfig = createPluginConfig({})
const config: Record<string, unknown> = {
model: "anthropic/claude-opus-4-6",
agent: {},
@@ -472,7 +483,7 @@ describe("default_agent behavior with Sisyphus orchestration", () => {
test("sets default_agent to sisyphus when configured default_agent is empty after trim", async () => {
// given
const pluginConfig: OhMyOpenCodeConfig = {}
const pluginConfig = createPluginConfig({})
const config: Record<string, unknown> = {
model: "anthropic/claude-opus-4-6",
default_agent: " ",
@@ -496,7 +507,7 @@ describe("default_agent behavior with Sisyphus orchestration", () => {
test("preserves custom default_agent names while trimming whitespace", async () => {
// given
const pluginConfig: OhMyOpenCodeConfig = {}
const pluginConfig = createPluginConfig({})
const config: Record<string, unknown> = {
model: "anthropic/claude-opus-4-6",
default_agent: " Custom Agent ",
@@ -520,11 +531,11 @@ describe("default_agent behavior with Sisyphus orchestration", () => {
test("does not normalize configured default_agent when Sisyphus is disabled", async () => {
// given
const pluginConfig: OhMyOpenCodeConfig = {
const pluginConfig = createPluginConfig({
sisyphus_agent: {
disabled: true,
},
}
})
const config: Record<string, unknown> = {
model: "anthropic/claude-opus-4-6",
default_agent: " HePhAeStUs ",
@@ -650,7 +661,7 @@ describe("Prometheus category config resolution", () => {
describe("Prometheus direct override priority over category", () => {
test("direct reasoningEffort takes priority over category reasoningEffort", async () => {
// given - category has reasoningEffort=xhigh, direct override says "low"
const pluginConfig: OhMyOpenCodeConfig = {
const pluginConfig = createPluginConfig({
sisyphus_agent: {
planner_enabled: true,
},
@@ -666,7 +677,7 @@ describe("Prometheus direct override priority over category", () => {
reasoningEffort: "low",
},
},
}
})
const config: Record<string, unknown> = {
model: "anthropic/claude-opus-4-6",
agent: {},
@@ -692,7 +703,7 @@ describe("Prometheus direct override priority over category", () => {
test("category reasoningEffort applied when no direct override", async () => {
// given - category has reasoningEffort but no direct override
const pluginConfig: OhMyOpenCodeConfig = {
const pluginConfig = createPluginConfig({
sisyphus_agent: {
planner_enabled: true,
},
@@ -707,7 +718,7 @@ describe("Prometheus direct override priority over category", () => {
category: "reasoning-cat",
},
},
}
})
const config: Record<string, unknown> = {
model: "anthropic/claude-opus-4-6",
agent: {},
@@ -733,7 +744,7 @@ describe("Prometheus direct override priority over category", () => {
test("direct temperature takes priority over category temperature", async () => {
// given
const pluginConfig: OhMyOpenCodeConfig = {
const pluginConfig = createPluginConfig({
sisyphus_agent: {
planner_enabled: true,
},
@@ -749,7 +760,7 @@ describe("Prometheus direct override priority over category", () => {
temperature: 0.1,
},
},
}
})
const config: Record<string, unknown> = {
model: "anthropic/claude-opus-4-6",
agent: {},
@@ -776,7 +787,7 @@ describe("Prometheus direct override priority over category", () => {
test("prometheus prompt_append is appended to base prompt", async () => {
// #given - prometheus override with prompt_append
const customInstructions = "## Custom Project Rules\nUse max 2 commits."
const pluginConfig: OhMyOpenCodeConfig = {
const pluginConfig = createPluginConfig({
sisyphus_agent: {
planner_enabled: true,
},
@@ -785,7 +796,7 @@ describe("Prometheus direct override priority over category", () => {
prompt_append: customInstructions,
},
},
}
})
const config: Record<string, unknown> = {
model: "anthropic/claude-opus-4-6",
agent: {},
@@ -820,12 +831,12 @@ describe("Plan agent model inheritance from prometheus", () => {
provenance: "provider-fallback",
variant: "max",
})
const pluginConfig: OhMyOpenCodeConfig = {
const pluginConfig = createPluginConfig({
sisyphus_agent: {
planner_enabled: true,
replace_plan: true,
},
}
})
const config: Record<string, unknown> = {
model: "anthropic/claude-opus-4-6",
agent: {
@@ -864,7 +875,7 @@ describe("Plan agent model inheritance from prometheus", () => {
provenance: "override",
variant: "high",
})
const pluginConfig: OhMyOpenCodeConfig = {
const pluginConfig = createPluginConfig({
sisyphus_agent: {
planner_enabled: true,
replace_plan: true,
@@ -881,7 +892,7 @@ describe("Plan agent model inheritance from prometheus", () => {
thinking: { type: "enabled", budgetTokens: 8000 },
},
},
}
})
const config: Record<string, unknown> = {
model: "anthropic/claude-opus-4-6",
agent: {},
@@ -919,7 +930,7 @@ describe("Plan agent model inheritance from prometheus", () => {
provenance: "provider-fallback",
variant: "max",
})
const pluginConfig: OhMyOpenCodeConfig = {
const pluginConfig = createPluginConfig({
sisyphus_agent: {
planner_enabled: true,
replace_plan: true,
@@ -931,7 +942,7 @@ describe("Plan agent model inheritance from prometheus", () => {
temperature: 0.5,
},
},
}
})
const config: Record<string, unknown> = {
model: "anthropic/claude-opus-4-6",
agent: {},
@@ -962,12 +973,12 @@ describe("Plan agent model inheritance from prometheus", () => {
provenance: "provider-fallback",
variant: "max",
})
const pluginConfig: OhMyOpenCodeConfig = {
const pluginConfig = createPluginConfig({
sisyphus_agent: {
planner_enabled: true,
replace_plan: true,
},
}
})
const config: Record<string, unknown> = {
model: "anthropic/claude-opus-4-6",
agent: {},
@@ -1001,11 +1012,11 @@ describe("Deadlock prevention - fetchAvailableModels must not receive client", (
// - Server waits for plugin init to complete before handling requests
const fetchSpy = spyOn(shared, "fetchAvailableModels" as any).mockResolvedValue(new Set<string>())
const pluginConfig: OhMyOpenCodeConfig = {
const pluginConfig = createPluginConfig({
sisyphus_agent: {
planner_enabled: true,
},
}
})
const config: Record<string, unknown> = {
model: "anthropic/claude-opus-4-6",
agent: {},
@@ -1041,7 +1052,7 @@ describe("config-handler plugin loading error boundary (#1559)", () => {
//#given
;(pluginLoader.loadAllPluginComponents as any).mockRestore?.()
spyOn(pluginLoader, "loadAllPluginComponents" as any).mockRejectedValue(new Error("crash"))
const pluginConfig: OhMyOpenCodeConfig = {}
const pluginConfig = createPluginConfig({})
const config: Record<string, unknown> = {
model: "anthropic/claude-opus-4-6",
agent: {},
@@ -1068,9 +1079,9 @@ describe("config-handler plugin loading error boundary (#1559)", () => {
spyOn(pluginLoader, "loadAllPluginComponents" as any).mockImplementation(
() => new Promise(() => {})
)
const pluginConfig: OhMyOpenCodeConfig = {
const pluginConfig = createPluginConfig({
experimental: { plugin_load_timeout_ms: 100 },
}
})
const config: Record<string, unknown> = {
model: "anthropic/claude-opus-4-6",
agent: {},
@@ -1096,7 +1107,7 @@ describe("config-handler plugin loading error boundary (#1559)", () => {
;(pluginLoader.loadAllPluginComponents as any).mockRestore?.()
spyOn(pluginLoader, "loadAllPluginComponents" as any).mockRejectedValue(new Error("crash"))
const logSpy = shared.log as ReturnType<typeof spyOn>
const pluginConfig: OhMyOpenCodeConfig = {}
const pluginConfig = createPluginConfig({})
const config: Record<string, unknown> = {
model: "anthropic/claude-opus-4-6",
agent: {},
@@ -1133,7 +1144,7 @@ describe("config-handler plugin loading error boundary (#1559)", () => {
plugins: [{ name: "test-plugin", version: "1.0.0" }],
errors: [],
})
const pluginConfig: OhMyOpenCodeConfig = {}
const pluginConfig = createPluginConfig({})
const config: Record<string, unknown> = {
model: "anthropic/claude-opus-4-6",
agent: {},
@@ -1179,9 +1190,9 @@ describe("per-agent todowrite/todoread deny when task_system enabled", () => {
oracle: { name: "oracle", prompt: "test", mode: "subagent" },
})
const pluginConfig: OhMyOpenCodeConfig = {
const pluginConfig = createPluginConfig({
experimental: { task_system: true },
}
})
const config: Record<string, unknown> = {
model: "anthropic/claude-opus-4-6",
agent: {},
@@ -1216,9 +1227,9 @@ describe("per-agent todowrite/todoread deny when task_system enabled", () => {
hephaestus: { name: "hephaestus", prompt: "test", mode: "primary" },
})
const pluginConfig: OhMyOpenCodeConfig = {
const pluginConfig = createPluginConfig({
experimental: { task_system: false },
}
})
const config: Record<string, unknown> = {
model: "anthropic/claude-opus-4-6",
agent: {},
@@ -1243,7 +1254,7 @@ describe("per-agent todowrite/todoread deny when task_system enabled", () => {
expect(agentResult[getAgentDisplayName("hephaestus")]?.permission?.todoread).toBeUndefined()
})
test("denies todowrite/todoread when task_system is undefined", async () => {
test("does not deny todowrite/todoread when task_system is undefined", async () => {
//#given
const createBuiltinAgentsMock = agents.createBuiltinAgents as unknown as {
mockResolvedValue: (value: Record<string, unknown>) => void
@@ -1252,7 +1263,7 @@ describe("per-agent todowrite/todoread deny when task_system enabled", () => {
sisyphus: { name: "sisyphus", prompt: "test", mode: "primary" },
})
const pluginConfig: OhMyOpenCodeConfig = {}
const pluginConfig = createPluginConfig({})
const config: Record<string, unknown> = {
model: "anthropic/claude-opus-4-6",
agent: {},
@@ -1271,8 +1282,8 @@ describe("per-agent todowrite/todoread deny when task_system enabled", () => {
//#then
const agentResult = config.agent as Record<string, { permission?: Record<string, unknown> }>
expect(agentResult[getAgentDisplayName("sisyphus")]?.permission?.todowrite).toBe("deny")
expect(agentResult[getAgentDisplayName("sisyphus")]?.permission?.todoread).toBe("deny")
expect(agentResult[getAgentDisplayName("sisyphus")]?.permission?.todowrite).toBeUndefined()
expect(agentResult[getAgentDisplayName("sisyphus")]?.permission?.todoread).toBeUndefined()
})
})
@@ -1287,9 +1298,9 @@ describe("disable_omo_env pass-through", () => {
sisyphus: { name: "sisyphus", prompt: "without-env", mode: "primary" },
})
const pluginConfig: OhMyOpenCodeConfig = {
const pluginConfig = createPluginConfig({
experimental: { disable_omo_env: true },
}
})
const config: Record<string, unknown> = {
model: "anthropic/claude-opus-4-6",
agent: {},
@@ -1323,7 +1334,7 @@ describe("disable_omo_env pass-through", () => {
sisyphus: { name: "sisyphus", prompt: "with-env", mode: "primary" },
})
const pluginConfig: OhMyOpenCodeConfig = {}
const pluginConfig = createPluginConfig({})
const config: Record<string, unknown> = {
model: "anthropic/claude-opus-4-6",
agent: {},
@@ -224,7 +224,7 @@ describe("applyToolConfig", () => {
"hephaestus",
"prometheus",
"sisyphus-junior",
])("#then should deny todo tools for %s agent by default", (agentName) => {
])("#then should NOT deny todo tools for %s agent by default", (agentName) => {
const params = createParams({
agents: [agentName],
})
@@ -234,8 +234,8 @@ describe("applyToolConfig", () => {
const agent = params.agentResult[agentName] as {
permission: Record<string, unknown>
}
expect(agent.permission.todowrite).toBe("deny")
expect(agent.permission.todoread).toBe("deny")
expect(agent.permission.todowrite).toBeUndefined()
expect(agent.permission.todoread).toBeUndefined()
})
})
})
+1 -1
View File
@@ -25,7 +25,7 @@ export function applyToolConfig(params: {
pluginConfig: OhMyOpenCodeConfig;
agentResult: Record<string, unknown>;
}): void {
const taskSystemEnabled = params.pluginConfig.experimental?.task_system ?? true
const taskSystemEnabled = params.pluginConfig.experimental?.task_system ?? false
const denyTodoTools = taskSystemEnabled
? { todowrite: "deny", todoread: "deny" }
: {}