Cache not found / Unable to reserve cache CI/CD Origin: Build & delivery Last updated 25 Oct 2026

GitHub Actions: Cache not found for input keys: npm-Linux-abc123 / Failed to save: Unable to reserve cache with key, another job may be creating this cache

actions/cache either found nothing for your key (restore miss) or could not save because another run is already saving the same key — usually harmless, but a sign your key design needs a look.

Exact message you may see Cache not found for input keysUnable to reserve cache with keyanother job may be creating this cacheFailed to save: Unable to reserve cacheFailed to restore: Cache service responded with 400
Seen on: GitHub Actions

Meaning

A cache is keyed by exact key, with restore-keys prefixes as fallback. Misses are normal on first run or after the lockfile changes. "Unable to reserve cache" occurs when parallel jobs write the same key; only the first succeeds. Caches are also scoped per branch (a PR can read the default branch's caches, not the reverse) and evicted after 7 days or when the 10 GB limit is reached.

Common causes

  • First run or the key changed (lockfile hash differs)
  • Parallel jobs saving the same key
  • Cache scoped to another branch or evicted (7 days, 10 GB limit)
  • Wrong path so nothing was saved
  • Using different OS/architecture in the key than in the restore

⚡ Quick fix

  1. Use hashFiles('**/package-lock.json') in the key plus restore-keys
  2. Save the cache from one job only (or include ${{ matrix.* }} in the key)
  3. Prefer the built-in cache of setup-node/setup-python

Detailed fix by platform

GitHub Actions

  1. uses: actions/setup-node@v4 with cache: npm handles keys for you

Code examples

Key with fallback

yaml
- uses: actions/cache@v4
  with:
    path: ~/.npm
    key: npm-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
    restore-keys: |
      npm-${{ runner.os }}-

How to diagnose

  1. Key — What exact key is requested?
  2. Scope — Branch of the cache?
  3. Writers — Several jobs saving the same key?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Build & delivery. Errors that are often confused with or caused by this one (click to open):

API rate limit exceeded — GitHub Actions: HttpError: API rate limit exceeded for installation ID 123456 / secondary rate limit (CI/CD)API rate limit exceed…Cannot perform an interactive login from a non TTY device — GitHub Actions: Error: Cannot perform an interactive login from a non TTY device (CI/CD)Cannot perform an int…Context access might be invalid — GitHub Actions: Context access might be invalid: AWS_ACCESS_KEY_ID (editor warning for secrets/vars) (CI/CD)Context access might …couldn't find remote ref (checkout) — GitHub Actions: fatal: couldn't find remote ref refs/heads/feature — The process '/usr/bin/git' failed with exit code 1 (actions/checkout) (CI/CD)couldn't find remote …Credentials could not be loaded — GitHub Actions: Error: Credentials could not be loaded, please check your action inputs: Could not load credentials from any providers (CI/CD)Credentials could not…deprecated version of actions/upload-artifact — GitHub Actions: Error: This request has been automatically failed because it uses a deprecated version of `actions/upload-artifact: v3` (CI/CD)deprecated version of…error parsing called workflow — GitHub Actions: error parsing called workflow ".github/workflows/ci.yml" -> "org/repo/.github/workflows/build.yml@main": workflow was not found (CI/CD)error parsing called …exceeded the maximum execution time — GitHub Actions: The job running on runner GitHub Actions 12 has exceeded the maximum execution time of 360 minutes (CI/CD)exceeded the maximum …Cache not…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.