Skip to content
Latchkey

GitHub Actions "Recursive workflow call detected"

Reusable workflows cannot form a call cycle. If a chain of workflow_call uses eventually re-invokes one already in the chain, GitHub detects the recursion and refuses to run it.

What this error means

A run with nested reusable-workflow calls fails with "Recursive workflow call detected", naming the workflow that re-enters the chain.

github-actions
Error: Recursive workflow call detected: org/repo/.github/workflows/deploy.yml@main

Common causes

Direct self-call

A reusable workflow uses itself, immediately forming a one-node cycle.

Indirect cycle through a chain

A calls B calls C calls A, so the call graph loops back on itself.

How to fix it

Break the recursive call chain

  1. Trace the workflow_call chain and find where it loops.
  2. Remove or restructure the call that re-enters an earlier workflow.
  3. Extract shared logic into a leaf workflow that calls nothing.
.github/workflows/build.yml
# leaf workflow has on: workflow_call and calls no other reusable workflow
on: workflow_call
jobs:
  build:
    runs-on: ubuntu-latest
    steps: [{ run: make }]

How to prevent it

  • Keep the reusable-workflow call graph acyclic.
  • Push shared steps into leaf workflows that call nothing.
  • Review nested workflow_call chains for loops.

Related guides

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