GitHub Actions · infra · fg-0225

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

Cache not found for input keys on a new branch although the same key exists

Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100

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

Affects: GitHub Actions dependency caching, as of October 2026

Sources

Have your agent know this before it fails

claude mcp add --transport http footgun https://getfootgun.com/api/mcp