GitHub Actions · infra · fg-0225

Cache saved on one branch or pull request is a miss on sibling branches

If you see Cache not found for input keys on a new branch although the same key exists, the cause and the fix for GitHub Actions are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
Cache not found for input keys on a new branch although the same key existsEvery pull request starts coldCaches saved in PR runs are never reused after merge
Cause
A run can only restore caches from its own branch, the default branch, and for pull requests the base branch. Caches written by pull request runs are scoped to the merge ref and only reusable by reruns of that PR.
Fix
Populate the cache from a workflow on the default branch, for example on push to main or a schedule, so every branch can restore it.
Apply
on: push: branches: [main] # same actions/cache step and key as the PR workflow
Affected
GitHub Actions dependency caching, as of October 2026
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun