GitHub Actions "too many jobs in workflow (256 limit)"
A single workflow run is limited to 256 jobs, counting all matrix expansions. Large matrices or many jobs that fan out together exceed the cap and the run is rejected. This is a hard limit.
What this error means
A workflow with large matrices or many jobs fails to start because the total number of jobs in the run exceeds 256.
Error: The workflow run exceeds the maximum of 256 jobs.Common causes
Matrix expansion too large
One or more matrices expand into a job count that, combined, exceeds 256.
Too many distinct jobs
The workflow defines a very large number of independent jobs in one run.
How to fix it
Reduce or split the job count
- Trim matrix dimensions or use include to target only needed combinations.
- Split the work across multiple workflows triggered separately.
- Group fine-grained jobs into fewer steps where possible.
strategy:
matrix:
include:
- { os: ubuntu-latest, node: 20 }
- { os: windows-latest, node: 20 }How to prevent it
- Keep total job count (after matrix expansion) under 256 per run.
- Use include to cover only the combinations you actually need.