Skip to content
Latchkey

GitHub Actions "Post job cleanup failed"

Many actions register a post step that runs after the job to save caches or remove credentials. A failure there is usually a transient upload error or a permissions/disk problem. On Latchkey managed runners, transient post-step upload failures are auto-retried.

What this error means

The job log shows a "Post" step (for example "Post Cache" or "Post Run actions/checkout") that fails after the main work succeeded.

github-actions
Post job cleanup.
##[error]Cache service responded with 500 during cache save
##[warning]Failed to save cache.

Common causes

Transient cache-save upload error

The cache backend returned a 5xx or timed out while the post step uploaded the archive.

No space or permission for cleanup

The post step could not write a temp archive or remove a file because the disk was full or the path was owned by a container user.

How to fix it

Reduce cache size and retry

  1. Re-run the job; transient upload errors usually clear on retry.
  2. If it persists, trim the cached paths so the archive fits and uploads reliably.
  3. For permission failures, ensure post steps can write to the workspace.
.github/workflows/ci.yml
- uses: actions/cache@v4
  with:
    path: ~/.npm
    key: npm-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
    # smaller, well-scoped paths upload more reliably

How to prevent it

  • Keep cache archives small and well scoped to reduce post-step upload risk.
  • Avoid leaving root-owned files that the post cleanup cannot remove.

Frequently asked questions

What causes ""post-job cleanup failed""?
The cache backend returned a 5xx or timed out while the post step uploaded the archive.
How do I fix "post-job cleanup failed"?
Reduce cache size and retry

Related guides

References

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