GitHub Actions "matrix ... exceeds the max number of jobs (256)"
The Cartesian product of your matrix dimensions plus include entries expanded to more than 256 jobs, which is the hard per-workflow-run limit, so GitHub rejects the workflow.
What this error means
The workflow fails to start with a message that the matrix exceeds the maximum number of 256 jobs. No jobs run until the matrix is trimmed.
github-actions
Error: The job matrix generated 384 jobs which exceeds the maximum of 256 jobs allowed per workflow run.Common causes
Too many combined dimensions
Several matrix axes multiplied together (os x version x arch x flag) blow past 256 combinations.
Large include/exclude expansion
Many include entries add jobs on top of the base product, pushing the total over the cap.
How to fix it
Shrink the matrix
- Drop axes or values you do not actually need to test.
- Use exclude to prune invalid combinations.
- Split the matrix across multiple workflows or jobs.
- Reserve the full matrix for nightly runs, not every push.
.github/workflows/ci.yml
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node: [18, 20]
exclude:
- os: windows-latest
node: 18How to prevent it
- Keep matrices to the combinations that add real coverage.
- Use exclude to prune invalid pairs early.
- Push exhaustive matrices to scheduled runs.
Related guides
GitHub Actions "You have exceeded the maximum number of concurrent jobs"Fix GitHub Actions "You have exceeded the maximum number of concurrent jobs for your plan" - queued jobs are…
GitHub Actions "Error: Process completed with exit code 1"Understand GitHub Actions "Error: Process completed with exit code 1" - a command in a run step failed and re…
GitHub Actions "Waiting for a runner to pick up this job" (queued forever)Fix a GitHub Actions job stuck on "Waiting for a runner to pick up this job..." that never starts and stays q…