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.
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## [Unreleased]
|
||||
### Removed
|
||||
|
||||
- Removed `MAX_PARALLEL_TASKS` constant and associated task count validation limit
|
||||
|
||||
## [10.6.1] - 2026-02-04
|
||||
|
||||
|
||||
@@ -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<string> {
|
||||
|
||||
return renderPromptTemplate(taskDescriptionTemplate, {
|
||||
agents,
|
||||
MAX_PARALLEL_TASKS,
|
||||
MAX_CONCURRENCY,
|
||||
});
|
||||
}
|
||||
@@ -221,23 +219,6 @@ export class TaskTool implements AgentTool<typeof taskSchema, TaskToolDetails, T
|
||||
};
|
||||
}
|
||||
|
||||
// Validate task count
|
||||
if (params.tasks.length > 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<string, number[]>();
|
||||
|
||||
@@ -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<typeof taskSchema>;
|
||||
|
||||
Reference in New Issue
Block a user