From d65c7c0800653a0aba562744ae149da8dd329952 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Fri, 3 Apr 2026 17:07:48 +0900 Subject: [PATCH] fix(tool-config): share task_system resolution Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- src/plugin-handlers/tool-config-handler.test.ts | 10 ++++++++++ src/plugin-handlers/tool-config-handler.ts | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/plugin-handlers/tool-config-handler.test.ts b/src/plugin-handlers/tool-config-handler.test.ts index 0fff60f5e..609d8386f 100644 --- a/src/plugin-handlers/tool-config-handler.test.ts +++ b/src/plugin-handlers/tool-config-handler.test.ts @@ -218,6 +218,16 @@ describe("applyToolConfig", () => { describe("#given task_system is undefined", () => { describe("#when applying tool config", () => { + it("#then should not disable todo tools globally by default", () => { + const params = createParams({}) + + applyToolConfig(params) + + const tools = params.config.tools as Record + expect(tools.todowrite).toBeUndefined() + expect(tools.todoread).toBeUndefined() + }) + it.each([ "atlas", "sisyphus", diff --git a/src/plugin-handlers/tool-config-handler.ts b/src/plugin-handlers/tool-config-handler.ts index 5953fd018..6db507bb8 100644 --- a/src/plugin-handlers/tool-config-handler.ts +++ b/src/plugin-handlers/tool-config-handler.ts @@ -1,5 +1,6 @@ import type { OhMyOpenCodeConfig } from "../config"; import { getAgentDisplayName, getAgentListDisplayName } from "../shared/agent-display-names"; +import { isTaskSystemEnabled } from "../shared/task-system-enabled"; type AgentWithPermission = { permission?: Record }; @@ -25,7 +26,7 @@ export function applyToolConfig(params: { pluginConfig: OhMyOpenCodeConfig; agentResult: Record; }): void { - const taskSystemEnabled = params.pluginConfig.experimental?.task_system ?? false + const taskSystemEnabled = isTaskSystemEnabled(params.pluginConfig) const denyTodoTools = taskSystemEnabled ? { todowrite: "deny", todoread: "deny" } : {}