From ca546b41af14b741f1468be77b37522745ea5078 Mon Sep 17 00:00:00 2001 From: can1357 Date: Thu, 5 Feb 2026 00:38:37 +0100 Subject: [PATCH] refactor(coding-agent/task): removed parallel task limit constraints - Removed `MAX_PARALLEL_TASKS` constant and associated task count validation logic. - Removed `maxItems` constraint from task schema array definition. - Removed task count validation check that rejected requests exceeding the parallel task limit. --- packages/coding-agent/CHANGELOG.md | 3 +++ packages/coding-agent/src/task/index.ts | 19 ------------------- packages/coding-agent/src/task/types.ts | 5 +---- 3 files changed, 4 insertions(+), 23 deletions(-) diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index 209a0e997..956944020 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -1,6 +1,9 @@ # Changelog ## [Unreleased] +### Removed + +- Removed `MAX_PARALLEL_TASKS` constant and associated task count validation limit ## [10.6.1] - 2026-02-04 diff --git a/packages/coding-agent/src/task/index.ts b/packages/coding-agent/src/task/index.ts index 06bd8dff1..a2650ef61 100644 --- a/packages/coding-agent/src/task/index.ts +++ b/packages/coding-agent/src/task/index.ts @@ -38,7 +38,6 @@ import { renderTemplate } from "./template"; import { type AgentProgress, MAX_CONCURRENCY, - MAX_PARALLEL_TASKS, type SingleResult, type TaskParams, type TaskToolDetails, @@ -115,7 +114,6 @@ async function buildDescription(cwd: string): Promise { return renderPromptTemplate(taskDescriptionTemplate, { agents, - MAX_PARALLEL_TASKS, MAX_CONCURRENCY, }); } @@ -221,23 +219,6 @@ export class TaskTool implements AgentTool MAX_PARALLEL_TASKS) { - return { - content: [ - { - type: "text", - text: `Too many tasks (${params.tasks.length}). Max is ${MAX_PARALLEL_TASKS}.`, - }, - ], - details: { - projectAgentsDir, - results: [], - totalDurationMs: 0, - }, - }; - } - const tasks = params.tasks; const missingTaskIndexes: number[] = []; const idIndexes = new Map(); diff --git a/packages/coding-agent/src/task/types.ts b/packages/coding-agent/src/task/types.ts index 18f8ef7fe..d8ddf89ce 100644 --- a/packages/coding-agent/src/task/types.ts +++ b/packages/coding-agent/src/task/types.ts @@ -19,9 +19,6 @@ function getEnv(name: string, defaultValue: number): number { return defaultValue; } -/** Maximum tasks per call */ -export const MAX_PARALLEL_TASKS = getEnv("OMP_TASK_MAX_PARALLEL", 32); - /** Maximum concurrent tasks */ export const MAX_CONCURRENCY = getEnv("OMP_TASK_MAX_CONCURRENCY", 16); @@ -66,7 +63,7 @@ export const taskSchema = Type.Object({ schema: Type.Optional( Type.Record(Type.String(), Type.Unknown(), { description: "JTD schema defining expected response structure" }), ), - tasks: Type.Array(taskItemSchema, { description: "Tasks to run in parallel", maxItems: MAX_PARALLEL_TASKS }), + tasks: Type.Array(taskItemSchema, { description: "Tasks to run in parallel" }), }); export type TaskParams = Static;