Skip to content

Fix agent assignment permission error in campaign generator workflow#11315

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/debug-agentic-workflow-failure-another-one
Closed

Fix agent assignment permission error in campaign generator workflow#11315
Copilot wants to merge 2 commits intomainfrom
copilot/debug-agentic-workflow-failure-another-one

Conversation

Copy link
Contributor

Copilot AI commented Jan 22, 2026

The campaign generator workflow failed to assign Copilot agents to issues due to insufficient token permissions. The assign-to-agent safe-output was falling back to GITHUB_TOKEN, which cannot execute the replaceActorsForAssignable GraphQL mutation.

Changes

  • Configure assign-to-agent to use GH_AW_PROJECT_GITHUB_TOKEN instead of default token
safe-outputs:
  assign-to-agent:
    github-token: "${{ secrets.GH_AW_PROJECT_GITHUB_TOKEN }}"

This follows the same token pattern used by create-project and update-project safe-outputs in the workflow. The token precedence chain for assign-to-agent is: custom token > top-level token > GH_AW_AGENT_TOKEN || GH_AW_GITHUB_TOKEN || GITHUB_TOKEN.

Original prompt

This section details on the original issue you should resolve

<issue_title>[agentics] Agentic Campaign Generator failed</issue_title>
<issue_description>### Workflow Failure

Workflow: Agentic Campaign Generator
Branch: main
Run URL: https://github.com/githubnext/gh-aw/actions/runs/21239895948

⚠️ Agent Assignment Failed: Failed to assign agent to issues due to insufficient permissions or missing token.

Assignment Errors:

  • Issue githubnext/gh-aw#11225 (agent: copilot): Failed to assign copilot via GraphQL

Action Required

Debug this workflow failure using the agentic-workflows agent:

/agent agentic-workflows

When prompted, instruct the agent to debug this workflow failure.

Generated from Agentic Campaign Generator

  • expires on Jan 29, 2026, 7:34 AM UTC

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

The assign-to-agent safe-output was using the default GITHUB_TOKEN which lacks
permissions to assign bots via GraphQL mutations (replaceActorsForAssignable).

Solution: Configure assign-to-agent to use GH_AW_PROJECT_GITHUB_TOKEN which has
the necessary permissions for bot assignment operations.

This fixes the "Resource not accessible by personal access token" error when
the workflow tries to assign the Copilot agent to issues.

Fixes #11225

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot AI changed the title [WIP] Debug Agentic Campaign Generator workflow failure Fix agent assignment permission error in campaign generator workflow Jan 22, 2026
Copilot AI requested a review from mnkiefer January 22, 2026 15:07
@mnkiefer
Copy link
Contributor

@copilot Update this in generator.go

@mnkiefer mnkiefer closed this Jan 22, 2026
Copilot stopped work on behalf of mnkiefer due to an error January 22, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[agentics] Agentic Campaign Generator failed

2 participants