Skip to content

Commit 636180e

Browse files
committed
fix: gate task tools when taskService is unavailable
Change-Id: Ifdb05e4154b75d4fa3247bb64678b6aa0fbd2c1e Signed-off-by: Thomas Kosiewski <tk@coder.com>
1 parent 380766c commit 636180e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/common/utils/tools/tools.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,13 @@ export async function getToolsForModel(
139139
propose_plan: createProposePlanTool(config),
140140
todo_write: createTodoWriteTool(config),
141141
todo_read: createTodoReadTool(config),
142-
task: createTaskTool(config),
143-
agent_report: createAgentReportTool(config),
142+
// Task tooling is optional (not available in all entrypoints like the CLI / replay tools).
143+
...(config.taskService
144+
? {
145+
task: createTaskTool(config),
146+
agent_report: createAgentReportTool(config),
147+
}
148+
: {}),
144149
status_set: createStatusSetTool(config),
145150
};
146151

0 commit comments

Comments
 (0)