Skip to content
Latchkey

GitHub Actions reusable workflow nesting limit exceeded in CI

GitHub limits how deeply reusable workflows can call other reusable workflows. A call chain past the allowed depth is rejected because the nested job exceeds the maximum nesting level.

What this error means

A run fails when a reusable workflow calls another that calls another past the limit, reporting that the nesting level was exceeded.

GitHub Actions
error parsing called workflow
".github/workflows/c.yml":
job 'deploy' calls a reusable workflow which exceeds the max reusable workflow nesting level

Common causes

Too many chained workflow_call layers

Workflow A calls B which calls C which calls D, going past the supported nesting depth.

A shared workflow itself calls deeply

A commonly reused workflow already nests internally, so calling it from a deep chain pushes over the limit.

How to fix it

Flatten the call chain

  1. Map the chain of uses: reusable-workflow calls.
  2. Collapse intermediate layers so the depth fits within the limit.
  3. Have the top workflow call leaf workflows directly where possible.
.github/workflows/caller.yml
jobs:
  build:
    uses: ./.github/workflows/build.yml
  deploy:
    needs: build
    uses: ./.github/workflows/deploy.yml

Replace a layer with a composite action

Move shared step logic into a composite action so it does not consume a reusable-workflow nesting level.

How to prevent it

  • Keep reusable-workflow chains shallow.
  • Prefer composite actions for shared step sequences.
  • Document the nesting depth of shared workflows.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →