Skip to content

Provider-based authentication for Claude, Copilot, Codex. #16498

Open

Description

@dsyme
  1. Our docs barely mention "CLAUDE_CODE_OAUTH_TOKEN" but it seems it is, in some sense, supported. But it's unclear how - the line
		"CLAUDE_CODE_OAUTH_TOKEN": "${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}",

seems to indicate that the CLAUDE_CODE_OAUTH_TOKEN should be stored as a secret but that should really be documented more

  1. We need to consider provider-based auth for Claude and Codex and Copilot. The claude provider-based authetication is here: https://code.claude.com/docs/en/authentication#cloud-provider-authentication

If we do we will also need to reconsider a few things in gh aw secrets bootstrap and gh aw add-wizard and so on. For example, if we add a workflow that is clearly using provider-based authentication then we really don't need any secret at all for that particular workflow - but may need an APP_ID or similar.

Activity

  1. added
    documentation
    enhancement
    on Feb 18, 2026
  2. mstrathman commented on Feb 23, 2026

    @mstrathman

    AWF API proxy doesn't support OAuth authentication

    We've been using CLAUDE_CODE_OAUTH_TOKEN with gh-aw on self-hosted ARM64 runners to bill through our Claude Teams subscription instead of per-token API usage. This was working previously but broke in a recent update.

    The AWF agent sandbox's API proxy currently only supports ANTHROPIC_API_KEY. When CLAUDE_CODE_OAUTH_TOKEN is set, Claude Code may use a different API endpoint or auth flow entirely, not just a different header on api.anthropic.com. The proxy strips client auth headers and injects x-api-key, and the Squid domain whitelist may block whatever endpoint OAuth needs to reach.

    Today the only workaround is sandbox: agent: false (+ strict: false) to bypass the proxy entirely, which defeats the purpose of the sandbox and introduces secondary issues (no privilege drop, root-user conflicts with --permission-mode bypassPermissions).

    Ask: Support CLAUDE_CODE_OAUTH_TOKEN as an alternative auth method through the sandbox. We're not sure what's involved, whether OAuth uses the same Anthropic API endpoint with a different header or a completely different backend, but either way it would be great to understand what's needed and get it on the roadmap.

    Environment: self-hosted ARM64 Linux runners, Ubuntu 22.04 LXC containers, gh aw v0.47.3.

  3. locked and limited conversation to collaborators on Feb 23, 2026
  4. unlocked this conversation on Feb 23, 2026
  5. pelikhan commented on Feb 23, 2026

    @pelikhan
    Collaborator

    It is not supported.

  6. mstrathman commented on Feb 23, 2026

    @mstrathman

    It is not supported.

    Understood. +1 for supporting it when priorities allow.

  7. locked and limited conversation to collaborators on Feb 23, 2026
  8. unlocked this conversation on Feb 23, 2026
  9. dsyme commented on Mar 1, 2026

    @dsyme
    CollaboratorAuthor

    @mstrathman Just to check - one reason we haven't been supporting CLAUDE_CODE_OAUTH_TOKEN is because we had the impression Anthropic were locking down on the use of this - transferring one token from one tool to another tool.

    But I want to just check - what's the technique you're using to get CLAUDE_CODE_OAUTH_TOKEN - is it one of the legitimate automated OIDC techniques for authentication?

    If so we should revisit and support this.

  10. mstrathman commented on Mar 4, 2026

    @mstrathman

    Hey, @dsyme, yeah, it is my understanding that Anthropic has been locking down abuse of CLAUDE_CODE_OAUTH_TOKENs, wondering if you think these would still be valid uses:

    For shared repos, an OIDC makes sense there to differentiate which user is initiating tasks rather than everything running under a shared identity.

    For solo developer repos, OIDC isn't really the point. It's simpler than that: a single developer working in their own repository. The token already represents them, there's no handoff between tools or identities happening, just their credentials running in a different execution context than their local machine.

    Totally understand if this use case it's not a priority.

  11. locked and limited conversation to collaborators on Mar 4, 2026
  12. 1 remaining item

  13. added a commit that references this issue on Apr 19, 2026
    2888abd
  14. locked and limited conversation to collaborators on Jun 19, 2026
  15. unlocked this conversation on Jun 19, 2026
  16. github-actions commented on Jul 17, 2026

    @github-actions
    Contributor

    Assigning to @mnkiefer as they are the most recent human contributor with relevant CLI/authentication work (recent PR on GitHub host detection for PAT creation).

    Generated by 🔧 Daily Assign Issue To User · 13.6 AIC · ⌖ 12.3 AIC · ⊞ 3.8K · ◷

  17. removed their assignment
    on Jul 17, 2026
  18. github-actions commented on Jul 20, 2026

    @github-actions
    Contributor

    Assigning this to @lpcox as the most relevant recent contributor — they have been actively merging PRs in this repo and this issue touches CLI authentication, which aligns with their recent work.

    Generated by 🔧 Daily Assign Issue To User · 16.5 AIC · ⌖ 10.5 AIC · ⊞ 3.8K · ◷

  19. stbenjam commented on Jul 25, 2026

    @stbenjam

    Claude's own actions allow using OIDC, but doesn't have the protections and sandboxing that gh-aw has, a little frustrating the only supported use for AW is through API token billing keys.

  20. locked and limited conversation to collaborators on Jul 25, 2026
  21. unlocked this conversation on Jul 25, 2026
  22. TimoGlastra commented on Nov 8, 2026

    @TimoGlastra

    The docs seem to describe using the CLAUDE_CODE_OAUTH_TOKEN as a valid use case for usage in CI, with docs on how to mint such a token with the CLI. See the docs here: https://code.claude.com/docs/en/authentication#generate-a-long-lived-token

    This is also where the Claude Code Github action setup links to as one of the two options to authenticate: https://code.claude.com/docs/en/github-actions

    It would be really useful if this type of auth could be supported, for users that are already using Github Actions + Claude Code for their agentic workflows, and want to upgrade that to GH Agentic Workflows

  23. locked and limited conversation to collaborators on Nov 8, 2026
  24. unlocked this conversation on Nov 8, 2026
  25. added
    backlog:engines
    on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ai-inspectedbacklog:enginesclidocumentationenhancementsecurity

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions