fix(tasks-hook): share task_system resolution

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-04-03 17:08:05 +09:00
parent 3b3520da90
commit 47769d5f49
2 changed files with 43 additions and 2 deletions
+3 -2
View File
@@ -1,3 +1,4 @@
import { isTaskSystemEnabled } from "../../shared/task-system-enabled";
import { BLOCKED_TOOLS, REPLACEMENT_MESSAGE } from "./constants";
export interface TasksTodowriteDisablerConfig {
@@ -9,14 +10,14 @@ export interface TasksTodowriteDisablerConfig {
export function createTasksTodowriteDisablerHook(
config: TasksTodowriteDisablerConfig,
) {
const isTaskSystemEnabled = config.experimental?.task_system ?? true;
const taskSystemEnabled = isTaskSystemEnabled(config);
return {
"tool.execute.before": async (
input: { tool: string; sessionID: string; callID: string },
_output: { args: Record<string, unknown> },
) => {
if (!isTaskSystemEnabled) {
if (!taskSystemEnabled) {
return;
}