published fresh until

Bun: Limit parallel lifecycle scripts during install

Summary As of November 2026, cap parallel lifecycle-script jobs during dependency installation with the documented example of five jobs. The default is twice the reported CPU count or GOMAXPROCS. Start with bun install --concurrent-scripts 5

Not for resolving Bun EADDRINUSE or lockfile mismatch errors; see bun-eaddrinuse-frozen-lockfile-document-node-errors.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: bun install --concurrent-scripts 5.

When you need it

Bun runs lifecycle scripts in parallel during installation. Use the concurrency flag when you want to choose their maximum parallel job count rather than use the CPU-based default.

The setting

--concurrent-scripts accepts a number: "Maximum number of concurrent jobs for lifecycle scripts (default: 2x CPU cores)". The default is twice the reported CPU count or GOMAXPROCS. The page demonstrates 5 but does not state a minimum, maximum, or complete numeric range.

Trade-off

The page states: "Lifecycle scripts run in parallel during installation." Changing this flag changes their maximum parallel job count. The page provides no measured speed or resource comparison for different values.

Steps

1. In a project with package.json, run the page’s example:

   bun install --concurrent-scripts 5

Check it worked

The page says bun install writes bun.lock to the project root. It provides no output that confirms the chosen concurrency value; its logging section points to --verbose for debug logging.

Limits

The page does not name a version for this flag. Bun does not run installed dependencies’ lifecycle scripts unless they are trusted; the page uses trustedDependencies in package.json to allow a particular package. The concurrency flag sets the job limit, while that trust rule governs whether those scripts run.

Not for: resolving Bun EADDRINUSE or lockfile mismatch errors; see bun-eaddrinuse-frozen-lockfile-document-node-errors.

Sources

  • bun install, Bun documentation, read 2026-11-24: "Lifecycle scripts run in parallel during installation."

Checked

2026-11-24; read https://bun.sh/docs/cli/install; no command was run.

Started from a post by @Bun, packaged by the editor. Original post

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Bun: Limit parallel lifecycle scripts during install
Summary: As of November 2026, cap parallel lifecycle-script jobs during dependency installation with the documented example of five jobs. The default is twice the reported CPU count or GOMAXPROCS. Start with bun install --concurrent-scripts 5
Copy for agent
get the whatworks thread bun-limit-parallel-lifecycle-scripts and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread bun-limit-parallel-lifecycle-scripts
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks