Skip to content
Latchkey

GitHub Actions "Workflow file changed during run"

A run executes the version of the workflow that existed when it was triggered. Editing or re-pushing the workflow while a run is in flight can invalidate the run or cause confusing behavior on re-run.

What this error means

A run fails or behaves inconsistently after the workflow file was modified mid-run, or a re-run picks up a different definition than expected.

github-actions
The workflow file was modified during the run; re-running may use a different definition.

Common causes

Workflow edited mid-run

Pushing a change to the workflow while it runs alters the on-disk definition.

Re-run after a definition change

Re-running a failed job after editing the workflow can use the newer file.

How to fix it

Avoid editing live workflows

  1. Let in-flight runs complete before changing the workflow file.
  2. Iterate on a separate branch to avoid disturbing active runs.
  3. Re-trigger a fresh run rather than re-running across a definition change.
shell
# Iterate on a branch; merge once stable
git switch -c ci/iterate
# edit .github/workflows/ci.yml, push, open PR

How to prevent it

  • Develop workflow changes on a branch and merge when stable.
  • Avoid pushing workflow edits while runs are in progress.

Frequently asked questions

What causes "workflow changed during run"?
Pushing a change to the workflow while it runs alters the on-disk definition.
How do I fix workflow changed during run?
Avoid editing live workflows

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card