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.
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 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
pathso nothing was saved - Using different OS/architecture in the key than in the restore
⚡ Quick fix
- Use
hashFiles('**/package-lock.json')in the key plusrestore-keys - Save the cache from one job only (or include
${{ matrix.* }}in the key) - Prefer the built-in cache of
setup-node/setup-python
Detailed fix by platform
GitHub Actions
uses: actions/setup-node@v4withcache: npmhandles keys for you
Code examples
Key with fallback
- uses: actions/cache@v4
with:
path: ~/.npm
key: npm-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
npm-${{ runner.os }}-How to diagnose
- Key — What exact key is requested?
- Scope — Branch of the cache?
- 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:
Similar errors
- API rate limit exceeded GitHub Actions: HttpError: API rate limit exceeded for installation ID 123456 / secondary rate limit
- Cannot perform an interactive login from a non TTY device GitHub Actions: Error: Cannot perform an interactive login from a non TTY device
- Context access might be invalid GitHub Actions: Context access might be invalid: AWS_ACCESS_KEY_ID (editor warning for secrets/vars)
Most viewed in CI/CD
- The process '/usr/bin/git' failed with exit code 128 GitHub Actions: Error: The process '/usr/bin/git' failed with exit code 128
- This job is stuck because you don't have any active runners GitLab CI: This job is stuck because you don't have any active runners online or available with any of these tags assigned to them
- Resource not accessible by integration GitHub Actions: Error: Resource not accessible by integration (403)
Other ways to find it
Where this error sits
Origin: Build & delivery. Errors that are often confused with or caused by this one (click to open):
🧠 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.
Report a correction or suggest an improvement
Last updated 25 Oct 2026