Skip to content

Documentation missing for GH_AW_GITHUB_TOKEN magic secret #20593

Closed

Description

@shea-parkes

Alright, this is me the human writing this paragraph. I think there was a documentation regression in #17990 that caused me a lot of pain over the last couple hours. I'll leave the opus-generated summary below (and I did read it and think it covers it pretty well). I just don't like posting pure GenAI issues without a human-authored frontmatter at this point.

Summary

Recent documentation refactoring (especially PR #17990) has removed specific guidance about the GH_AW_GITHUB_TOKEN magic secret. Users are left without clear instructions about:

  • When and why GH_AW_GITHUB_TOKEN is required (especially for tools.github in lockdown mode, safe outputs writing content, etc.)
  • What permissions are needed for the PAT used as this secret
  • How to create the token for both individual and organization-owned repos
  • How it interacts with the fallback chain ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}

Context / Impact

  • Workflows compiled by add-wizard and others routinely reference ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}, but the only documentation left are scattered code comments and snippets in lockdown-mode.md, with no coherent, full description.
  • This leaves new users confused about requirements for agentic workflows that WRITE to issues/discussions, especially in public repos with lockdown mode enabled.
  • Previous docs in auth.mdx provided detailed guidance; that section was deleted and not fully reincorporated into new dedicated pages.

Recommendation

  • Restore comprehensive documentation for GH_AW_GITHUB_TOKEN.
  • Include:
    • Clear description of WHEN it's required
    • Step-by-step PAT creation instructions (with links to GitHub's PAT UI)
    • Explicit list of required scopes/permissions for agentic workflows
    • Notes on public vs. private repos, lockdown mode, and fallback logic
    • References to relevant YAML snippets/code to make requirements obvious
  • Ideally, the docs should live in auth-projects.mdx, github-tools.md, or a new dedicated page (as appropriate).

Related files / evidence

Tactful ask:
Could maintainers please add back clear documentation for GH_AW_GITHUB_TOKEN and its requirements so new and existing users can correctly configure authentication for writing agentic workflows?

Activity

  1. locked and limited conversation to collaborators on Mar 11, 2026
  2. unlocked this conversation on Mar 11, 2026
  3. mvanhorn commented on Mar 15, 2026

    @mvanhorn

    Agentic Implementation Plan: Document GH_AW_GITHUB_TOKEN

    Problem

    Documentation regression in #17990 removed docs for the GH_AW_GITHUB_TOKEN magic secret, causing confusion for developers setting up workflows.

    Proposed Changes

    1. Find the secrets/tokens documentation (likely in docs/ or README)
    2. Add a section for GH_AW_GITHUB_TOKEN documenting:
      • Purpose: what it provides access to
      • When to use it vs. GITHUB_TOKEN
      • How to configure it in workflow files
      • Example usage
    3. Verify other magic secrets are documented to prevent similar gaps
    4. Reference 🔐 Refactor auth docs and add GH_AW_CI_TRIGGER_TOKEN magic secret support #17990 as context for the regression

    Testing

  4. locked and limited conversation to collaborators on Mar 15, 2026
  5. unlocked this conversation on Mar 15, 2026
  6. added
    documentation
    on May 27, 2026
  7. pelikhan commented on Oct 7, 2026

    @pelikhan
    Collaborator

    Status (2026-10-07; Needs progress check): The March 15 comment outlines a plan to document GH_AW_GITHUB_TOKEN, but the discussion does not establish that the guidance was published. This issue remains open and needs a progress check against the current authentication docs before deciding what guidance is still missing.

  8. mvanhorn commented on Oct 10, 2026

    @mvanhorn

    This looks covered now. #37583 (merged June 7) added a GH_AW_GITHUB_TOKEN section to the auth reference: when to use it, the fallback chain, and how to create a fine-grained PAT with minimum permissions. My March plan never turned into a PR, so nothing else is coming from me here.

    The one piece I don't see spelled out there is lockdown mode, if that still matters to @shea-parkes. Otherwise this can probably close.

  9. locked and limited conversation to collaborators on Oct 10, 2026
  10. unlocked this conversation on Oct 10, 2026
  11. shea-parkes commented on Oct 12, 2026

    @shea-parkes
    Author

    Thanks. This looks good to me. I appreciate it.

  12. shea-parkes commented on Oct 12, 2026

    @shea-parkes
    Author

    Hrm, I'm stuck on the GutHub mobile app and it's erroring when I try to close this. Sorry I can't close it myself today.

  13. locked and limited conversation to collaborators on Oct 12, 2026
  14. unlocked this conversation on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-generatedai-inspectedcommunitydocumentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions