-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
Description
The read-many-files tool processes all matched files concurrently without any concurrency limits.
// packages/core/src/tools/read-many-files.ts
// No concurrency limit
const results = await Promise.allSettled(fileProcessingPromises);Impact
- Crashes with
EMFILE: too many open fileson large directories (e.g.,node_modules) - Potential denial of service due to OS file descriptor exhaustion
- Unable to scan full project trees reliably
Potential Fix
Introduce a concurrency limit using a p-limit wrapper (e.g., max 20 concurrent operations) to respect OS limits.
Metadata
Metadata
Assignees
Labels
No labels