-
-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Problem
The [runner] concurrency setting (default: 4) controls how many skills run in parallel. But each skill also spawns up to 5 file-level workers (fileConcurrency = 5 hardcoded in cli/output/tasks.ts:539 and sdk/types.ts:12). This means with default settings, you can see up to 20 concurrent tasks (4 skills × 5 files each), and with a higher skill concurrency you can easily hit 10+ simultaneous API calls.
The concurrency setting should act as a global task limit — the total number of concurrent hunk/file analyses across all skills — not just a limit on how many skills run in parallel.
Current Behavior
[runner]
concurrency = 5 # ← controls skill-level parallelism only
- 5 skills run in parallel
- Each skill processes up to 5 files concurrently (hardcoded
DEFAULT_FILE_CONCURRENCY = 5) - Actual concurrent tasks: up to 25
Expected Behavior
concurrency should be a global pool that all file/hunk analysis tasks draw from, regardless of which skill spawned them. If concurrency = 5, there should never be more than 5 active API calls at any given time.
Relevant Code
- Skill-level concurrency:
src/cli/main.ts:547,src/cli/output/tasks.ts:531-574 - File-level concurrency (hardcoded):
src/cli/output/tasks.ts:539,src/sdk/types.ts:12 - Pool implementation:
src/utils/async.ts(runPool)