You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ResearchPlanAssignOps is a four-phase development pattern that moves from automated discovery to merged code with human control at every decision point. A research agent surfaces insights, a planning agent converts them into actionable issues, a coding agent implements the work by [assigning issues to GitHub Copilot](/gh-aw/reference/assign-to-copilot/), and a human reviews and merges.
8
+
ResearchPlanAssignOps is a four-phase development pattern that moves from automated discovery to merged code with human control at every decision point. A research agent surfaces insights, a planning agent converts them into actionable issues, a coding agent implements the work by [assigning issues to GitHub Copilot](/gh-aw/reference/copilot-cloud-agent/), and a human reviews and merges.
9
9
10
10
## The Four Phases
11
11
@@ -179,4 +179,4 @@ Prefer a simpler pattern when:
179
179
-[DispatchOps](/gh-aw/patterns/dispatch-ops/) — Manually triggered research and one-off investigations
180
180
-[WorkQueueOps](/gh-aw/patterns/workqueue-ops/) — Sequential queue processing for large backlogs
Copy file name to clipboardExpand all lines: docs/src/content/docs/reference/auth.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ Workflows using the following **read** operations from GitHub require [Additiona
34
34
35
35
Workflows using the following features of [Safe Outputs](/gh-aw/reference/safe-outputs/) require additional authentication, via either a secret containing a PAT or GitHub App:
Copy file name to clipboardExpand all lines: docs/src/content/docs/reference/copilot-cloud-agent.mdx
+40-11Lines changed: 40 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,50 @@
1
1
---
2
-
title: Assign to Copilot
3
-
description: Programmatically assign GitHub Copilot coding agent to issues and pull requests
2
+
title: Copilot Cloud Agent
3
+
description: Spawn new Copilot cloud agent sessions and assign Copilot to issues and pull requests
4
4
sidebar:
5
5
order: 810
6
6
---
7
7
8
8
importVideofrom'../../../components/Video.astro';
9
9
10
-
This page describes how to programmatically assign the [GitHub Copilot coding agent](https://docs.github.com/en/copilot/concepts/agents/coding-agent/about-coding-agent)to issues or pull requests using the `assign-to-agent` safe output. This automates the [standard GitHub workflow for assigning issues to Copilot](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/create-a-pr#assigning-an-issue-to-copilot).
10
+
This page covers two safe outputs for invoking the [GitHub Copilot cloud agent](https://docs.github.com/en/copilot/concepts/agents/coding-agent/about-coding-agent)from workflows:
11
11
12
-
## When to Use
12
+
-**[`create-agent-session`](#create-agent-session)** — Spawn a new Copilot agent session to work on a task
13
+
-**[`assign-to-agent`](#assign-to-agent)** — Assign Copilot to an existing issue or pull request
13
14
14
-
Use `assign-to-agent` when you need to programmatically assign Copilot coding agent to **existing** issues or PRs through workflow automation.
15
+
Both safe outputs require a fine-grained PAT — see [Authentication](#authentication) below.
15
16
16
-
If you're creating new issues and want to assign Copilot coding agent immediately, use `assignees: copilot` in your [`create-issue`](/gh-aw/reference/safe-outputs/#issue-creation-create-issue) configuration instead.
17
+
## Create Agent Session
17
18
18
-
## Configuration
19
+
Creates a new Copilot coding agent session from workflow output, allowing a workflow to spawn follow-up work autonomously. The agent session appears as a GitHub issue that triggers Copilot to implement the described task and open a pull request.
github-token: ${{ secrets.GH_AW_AGENT_TOKEN }} # token for permissions
31
+
```
32
+
33
+
### Cross-Repository
34
+
35
+
`create-agent-session` supports `target-repo` and `allowed-repos` for cross-repository use but does **not** support `target-repo: "*"` — use an explicit `owner/repo` value or `allowed-repos` instead.
36
+
37
+
## Assign to Agent
38
+
39
+
Programmatically assigns the GitHub Copilot coding agent to **existing** issues or pull requests through workflow automation. This automates the [standard GitHub workflow for assigning issues to Copilot](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/create-a-pr#assigning-an-issue-to-copilot).
40
+
41
+
### When to Use
42
+
43
+
Use `assign-to-agent` when you need to programmatically assign Copilot to **existing** issues or PRs.
44
+
45
+
If you're creating new issues and want to assign Copilot immediately, use `assignees: copilot` in your [`create-issue`](/gh-aw/reference/safe-outputs/#issue-creation-create-issue) configuration instead.
The `target` parameter determines which issue or PR to assign the agent to:
42
71
43
72
- `target: "triggering"` (default) - Auto-resolves from `github.event.issue.number` or `github.event.pull_request.number`
44
73
- `target: "*"` - Requires explicit `issue_number` or `pull_number` in agent output
45
74
- `target: "123"` - Always uses issue/PR #123
46
75
47
-
## Cross-Repository PR Creation
76
+
### Cross-Repository PR Creation
48
77
49
78
Use `pull-request-repo` to create pull requests in a different repository than where the issue lives — useful when issues are tracked centrally but code lives elsewhere. The issue repository is determined by `target-repo` or defaults to the workflow's repository.
50
79
51
80
`pull-request-repo`is automatically included in the allowed list; use `allowed-pull-request-repos` for additional repositories. Use `base-branch` to target a specific branch (defaults to the target repo's default branch).
52
81
53
-
## Assignee Filtering
82
+
### Assignee Filtering
54
83
55
84
When an `allowed` list is configured, existing agent assignees not in the list are removed while regular user assignees are preserved.
56
85
57
86
## Authentication
58
87
59
-
This safe output requires a fine-grained PAT to authenticate the agent assignment operation. The default `GITHUB_TOKEN` lacks the necessary permissions.
88
+
Both safe outputs require a fine-grained PAT. The default `GITHUB_TOKEN` lacks the necessary permissions.
Copy file name to clipboardExpand all lines: docs/src/content/docs/reference/glossary.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -234,11 +234,11 @@ A safe output capability for removing labels from issues or pull requests. Suppo
234
234
235
235
### Assign to Agent
236
236
237
-
A safe output capability (`assign-to-agent:`) that programmatically assigns the GitHub Copilot coding agent to existing issues or pull requests. Automates the standard GitHub workflow for delegating implementation tasks to Copilot. Supports cross-repository PR creation via `pull-request-repo` and agent model selection via `model`. See [Assign to Copilot](/gh-aw/reference/assign-to-copilot/).
237
+
A safe output capability (`assign-to-agent:`) that programmatically assigns the GitHub Copilot coding agent to existing issues or pull requests. Automates the standard GitHub workflow for delegating implementation tasks to Copilot. Supports cross-repository PR creation via `pull-request-repo` and agent model selection via `model`. See [Copilot Cloud Agent](/gh-aw/reference/copilot-cloud-agent/).
238
238
239
239
### GH_AW_AGENT_TOKEN
240
240
241
-
A recognized "magic" repository secret name that GitHub Agentic Workflows automatically uses as a fallback Personal Access Token for `assign-to-agent` operations. When set, no explicit `github-token:` reference is needed in workflow frontmatter — the token is injected automatically. Required because GitHub App installation tokens are rejected by the Copilot assignment API. The token fallback chain is: `assign-to-agent.github-token`→ `safe-outputs.github-token` → `GH_AW_AGENT_TOKEN` → `GH_AW_GITHUB_TOKEN` → `GITHUB_TOKEN`. See [Assign to Copilot](/gh-aw/reference/assign-to-copilot/).
241
+
A recognized "magic" repository secret name that GitHub Agentic Workflows automatically uses as a fallback Personal Access Token for `assign-to-agent` operations. When set, no explicit `github-token:` reference is needed in workflow frontmatter — the token is injected automatically. Required because GitHub App installation tokens are rejected by the Copilot assignment API. The token fallback chain is: `assign-to-agent.github-token`→ `safe-outputs.github-token` → `GH_AW_AGENT_TOKEN` → `GH_AW_GITHUB_TOKEN` → `GITHUB_TOKEN`. See [Copilot Cloud Agent](/gh-aw/reference/copilot-cloud-agent/).
github-token: ${{ secrets.SOME_CUSTOM_TOKEN }} # optional custom token for permissions
1312
1312
```
1313
1313
1314
+
See **[Copilot Cloud Agent](/gh-aw/reference/copilot-cloud-agent/#create-agent-session)** for full details and authentication setup.
1315
+
1314
1316
### Assign to Agent (`assign-to-agent:`)
1315
1317
1316
1318
Programmatically assigns GitHub Copilot coding agent to **existing** issues or pull requests through workflow automation. This safe output automates the [standard GitHub workflow for assigning issues to Copilot](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/create-a-pr#assigning-an-issue-to-copilot).
@@ -1332,7 +1334,7 @@ safe-outputs:
1332
1334
github-token: ${{ secrets.SOME_CUSTOM_TOKEN }} # optional custom token for permissions
1333
1335
```
1334
1336
1335
-
See **[Assign to Copilot](/gh-aw/reference/assign-to-copilot/)** for complete configuration options and authorization setup.
1337
+
See **[Copilot Cloud Agent](/gh-aw/reference/copilot-cloud-agent/#assign-to-agent)** for complete configuration options and authorization setup.
1336
1338
1337
1339
If you're creating new issues and want to assign an agent immediately, use `assignees: copilot` in your [`create-issue`](#issue-creation-create-issue) configuration instead.
[Custom safe output jobs](/gh-aw/reference/custom-safe-outputs/) receive the `GH_AW_SAFE_OUTPUTS_STAGED` environment variable set to `"true"` when staged mode is active, allowing you to implement your own preview behavior.
0 commit comments