Skip to content

Reusable workflow missing GH_TOKEN for gh CLI in agents #9493

@bdougie

Description

@bdougie

Problem

continue-agents.yml doesn't set GH_TOKEN in the "Run agent" step. Agents using gh CLI fail:

Cannot access PR information - missing GH_TOKEN environment variable for GitHub CLI authentication.

Fix

- name: Run agent
  env:
    ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
    GH_TOKEN: ${{ github.token }}  # Add this

Security Note

This grants agents access to github.token. Users should understand agents can perform any action the token permissions allow. Use at your own risk.

Evidence

https://github.com/bdougie/contributor.info/actions/runs/20937945685/job/60164997846

Metadata

Metadata

Assignees

Labels

area:configurationRelates to configuration optionsgithub_actionsPull requests that update GitHub Actions codekind:bugIndicates an unexpected problem or unintended behaviorreleased

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions