From e25d4153a6982390405915d3a0bffe0a8cb3c95e Mon Sep 17 00:00:00 2001 From: Janni Turunen Date: Mon, 23 Feb 2026 20:38:30 +0200 Subject: [PATCH] fix(tasks): raise concurrent task limit from 5 to 10 (#330) --- .fork-features/manifest.json | 5 +++-- packages/opencode/src/tool/task.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.fork-features/manifest.json b/.fork-features/manifest.json index 2ec36ee643e..16cc0bb636f 100644 --- a/.fork-features/manifest.json +++ b/.fork-features/manifest.json @@ -9,7 +9,7 @@ "features": { "async-tasks": { "status": "active", - "description": "Background task execution with slot-based concurrency (max 5). Supports both async and sync modes. Enables agent orchestration via /task and /check_task tools.", + "description": "Background task execution with slot-based concurrency (max 10). Supports both async and sync modes. Enables agent orchestration via /task and /check_task tools.", "issue": "https://github.com/randomm/opencode/issues/159", "newFiles": [ "packages/opencode/src/session/async-tasks.ts", @@ -48,7 +48,8 @@ "triggerWakeup", "autoWakeupSubscribers", "hasUndeliveredCompletedTasks", - "getAndClearCompletedTasks" + "getAndClearCompletedTasks", + "MAX_CONCURRENT_TASKS_PER_SESSION = 10" ], "tests": [ "packages/opencode/test/tool/check_task.test.ts", diff --git a/packages/opencode/src/tool/task.ts b/packages/opencode/src/tool/task.ts index 9cd9909ec10..9a7a6d79e84 100644 --- a/packages/opencode/src/tool/task.ts +++ b/packages/opencode/src/tool/task.ts @@ -31,7 +31,7 @@ const parameters = z.object({ sync: z.boolean().describe("Execute synchronously and wait for result").optional(), }) -const MAX_CONCURRENT_TASKS_PER_SESSION = 5 +const MAX_CONCURRENT_TASKS_PER_SESSION = 10 type LockCallback = (release: () => void) => void interface LockState {