Unable to assign copilot cloud agent to github issues using rest API #197976
Replies: 1 comment
-
If you are running this from a GitHub Actions workflow using the default GITHUB_TOKEN, it likely lacks the required organizational permissions to invoke the Copilot agent bot. Switch your authentication to a Personal Access Token (PAT) or a GitHub App token with write permissions for both Issues and Copilot Agents, and try the request again.
GitHub recently standardized the agent naming conventions. If you are forcing "copilot-swe-agent[bot]" inside the assignees array, the API might validate the issue creation but fail to trigger the agent backend. Try removing the assignees array entirely and let the agent_assignment block handle the routing implicitly:
If your organization recently updated branch protections or repository rulesets, the Copilot cloud agent might be getting blocked from starting a session because it can't automatically create its working branch. Ensure your repository rulesets allow bypass permissions for the Copilot Agent apps. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Discussion Type
Question
💬 Feature/Topic Area
API
Body
Hi, im facing issue to create and assigning copilot cloud agent to Github issues using rest API. its working a few weeks ago, but this week it stopped working. i've confirm that Github issue is created and copilot is set as assignee. However, copilot cloud agent is not starting up. is there anything i've missed out? i've tried to switch assignees to "copilot" too.
This is my post body:
{ "title": "issue title", "body": "issue body", "labels": [ "agent" ], "assignees": [ "copilot-swe-agent[bot]" ], "agent_assignment": { "target_repo": "my-organization/my-repo", "base_branch": "main", "custom_instructions": "update meta title in header to abc", "custom_agent": "" } }Beta Was this translation helpful? Give feedback.
All reactions