You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
vp run -r executes each package task twice when the root package has a matching recursive script #3221
vp run -r <task> selects every package in the workspace including the workspace-root package. When the root package's package.json defines a same-named script that itself calls vp run -r <task> (the documented monorepo pattern), that script is expanded inline and schedules a second copy of every package's task in the same run — so each package's task runs twice concurrently.
vp run summary reports ~2× the expected task count (e.g. 25 tasks for 12 packages).
vp run --last-details lists the same task id twice, e.g. @workhub/shared#test appears as two separate entries in one run.
Command echoes (~/packages/shared$ vp test run) and RUN v5.0.4 banners appear twice per package, started within ~2s of each other → the two executions run concurrently, not sequentially.
Why it is harmful
Doubled wall time for typecheck / lint / test on every vp run -r.
Any task that is not safe to run twice concurrently in the same directory breaks. Our apps/api story tests create a temporary probe file at a fixed path and lint it; the two concurrent vp test run processes raced on the filename (existsSync guard threw "already exists"), which is how we noticed — it failed our deploy pipeline.
--concurrency-limit does not help: both copies are in the same task graph.
Expected behavior
One of:
-r does not select the workspace-root package's package.json scripts, or
when a selected script expands to vp run invocations, the expanded task specs are deduplicated against already-scheduled tasks in the same run.
Workaround
Select packages explicitly, excluding root:
vp run -F './apps/*' -F './packages/*'test# each package runs exactly once
Note -F and -r cannot be combined (--filter and --recursive cannot be used together), and {apps,packages}/* brace globs do not match — two -F flags are needed.
Environment
vite-plus 1.2.0, bun workspaces (apps/*, packages/*), Node 22, macOS arm64 and GitHub Actions ubuntu-latest (same behavior on both).
Activity
wan9chi commentedon Oct 24, 2026
Thanks for reporting! I can't seem to reproduce it based on your description. Could you please provide a minimal project that produces this issue?