Skip to content
Latchkey

GitHub Actions actions/stale Closes Nothing or Everything

The actions/stale workflow runs but marks or closes nothing - or sweeps far more than intended. The usual causes are missing write permissions, a debug/dry-run day setting, or mismatched exempt labels.

What this error means

The scheduled stale job completes successfully but no issues or PRs are labeled or closed, or it unexpectedly closes active ones. The logs show it processed zero items or the wrong set.

Actions log
Warning: Resource not accessible by integration
# stale tried to label an issue without issues: write
# or: days-before-stale: -1 (debug) silently disables staling

Common causes

Missing issues/pull-requests write permission

actions/stale needs issues: write and pull-requests: write to label and close items. Without them it errors "Resource not accessible by integration" and processes nothing.

Day thresholds or labels misconfigured

A negative days-before-stale is a debug/no-op value, and exempt-issue-labels that do not match your real labels cause stale to skip (or not skip) the wrong items.

How to fix it

Grant the required permissions

.github/workflows/stale.yml
permissions:
  issues: write
  pull-requests: write
jobs:
  stale:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/stale@v9
        with:
          days-before-stale: 60
          days-before-close: 7

Fix thresholds and exempt labels

  1. Use positive day values; -1 disables that phase (a debug mode), it does not mean "immediately".
  2. Match exempt-issue-labels / exempt-pr-labels to labels that actually exist.
  3. Set operations-per-run high enough to cover your backlog, since it is rate-limited per run.

How to prevent it

  • Declare issues: write and pull-requests: write for stale workflows.
  • Start with a debug run (days-before-close: -1) to preview before enabling close.
  • Keep exempt label names in sync with your real labels.

Frequently asked questions

What causes "actions/stale misfires"?
actions/stale needs issues: write and pull-requests: write to label and close items. Without them it errors "Resource not accessible by integration" and processes nothing.
How do I fix actions/stale misfires?
Grant the required permissions

Related guides

References

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