Skip to content

run-many --parallel option not honored when one (or more) targets depend on continuous task #31494

Description

@techfg

Current Behavior

When executing npx nx run-many -t target1 target2 --parallel=1, the targets are not serialized and instead run concurrently if one (or more) of the targets depends on a continuous target.

Expected Behavior

Only one target should execute at a time given --parallel=1 regardless of whether of whether or not continuous is involved in the target dependency chain.

GitHub Repo

https://github.com/techfg/nx-21-continuous-tasks-repros

Steps to Reproduce

  1. git clone https://github.com/techfg/nx-21-continuous-tasks-repros.git
  2. npx nx run-many -t first second third --parallel=1

Actual Behavior: first and second execute and then third executes after first and second are complete

  1. npx nx run-many -t third fourth --parallel=1

Actual Behavior: third and fourth execute concurrently

Nx Report

Node           : 22.16.0
OS             : linux-x64
Native Target  : x86_64-linux
npm            : 10.9.2

nx             : 21.1.3
@nx/js         : 21.1.3
@nx/workspace  : 21.1.3
@nx/devkit     : 21.1.3
typescript     : 5.7.3
---------------------------------------
Registered Plugins:
@nx/js/typescript
---------------------------------------
Cache Usage: 0.00 B / 100.69 GB

Failure Logs

Package Manager Version

npm 10.9.2

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

  • --parallel=1 is properly honored when none of the targets depend on a continuous task. For example, executing npx nx run-many -t first second will serialize the execution of the targets as expected

Activity

  1. added theissue type on Jun 8, 2025
  2. edbzn commented on Sep 11, 2025

    @edbzn
    Contributor

    Hey, we are facing the same issue. We have to run our e2e test with --parallel=1, but after migrating to Nx 21 and continuous tasks, the parallel option is not honored anymore. We've tried using affected instead, but same result. However, dropping the continuous property seems to fix the issue. This issue will prevent us from running a lot of (continuous) tasks in the DTE.

  3. github-actions commented on Mar 12, 2026

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it hasn't had any activity for 6 months.
    Many things may have changed within this time. The issue may have already been fixed or it may not be relevant anymore.
    If at this point, this is still an issue, please respond with updated information.
    It will be closed in 21 days if no further activity occurs.
    Thanks for being a part of the Nx community! 🙏

  4. techfg commented on Mar 12, 2026

    @techfg
    Author

    This issue is still occurring. #34117 was created as a duplicate and #34721 is aimed at addressing.

  5. added a commit that references this issue on Mar 21, 2026
    e0b7f12
  6. added a commit that references this issue on Mar 26, 2026
    261c61d
  7. github-actions commented on Apr 21, 2026

    @github-actions
    Contributor

    This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

  8. locked as resolved and limited conversation to collaborators on Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions