Integrating Copilot cloud agent with Slack - GitHub Docs
Skip to main content Skip to content Collapse sidebar Expand sidebar Integrating Copilot cloud agent with Slack Provide context to the Copilot cloud agent and open pull requests, all from within your Slack workspace. Who can use this feature? Available for all paid Copilot plans . In this article Note GitHub Copilot uses AI. Check for mistakes. See Application card: GitHub Copilot Agents . Introduction The Copilot cloud agent integration in Slack allows you to interact with Copilot cloud agent from your Slack workspace and is included in the GitHub app for Slack.
Within a Slack message, thread, or direct message, you can initiate cloud agent sessions to investigate, plan, write code, and create issues and pull requests, using the context of your conversation. You can also choose the model, connect Model Context Protocol (MCP) servers, work across multiple repositories, and utilize Copilot Memory. Your team's collaborative decisions stay connected to your code, bridging the gap between where discussions happen and where implementation lives.
For information about additional Copilot integrations, see Copilot integrations . Security considerations Before you @mention GitHub in Slack, consider that Copilot cloud agent will capture the entire thread as context for your request, understanding and implementing solutions based on the discussion. This context is stored in the artifacts the agent generates. If you want to limit the context, you can send a direct message to the GitHub app for Slack instead.
Understanding collaborative sessions, permissions, code channels, and sandboxes The identity Copilot uses depends on whether you interact with it in a direct message or a shared context. When you use Copilot in a direct message, it can take actions for you, such as creating pull requests or issues, as well as answer questions. It uses the permissions of your linked GitHub personal account to take these actions. When you use Copilot in a shared context, such as a group thread or channel, Copilot creates artifacts, such as pull requests, under its app identity rather than your personal account.
Note Pull requests created in a shared context by Copilot use the app's identity. If you use repository rulesets, because these pull requests aren't attributed to a person, one more approval is required before merging, as long as the repository already requires at least one approval. This is enabled by default. See Available rules for rulesets . Only users with write access to every repository selected for a session can trigger Copilot to make changes or steer that session, but any conversation participant can provide input.
Guest members of a workspace, and outside collaborators to repositories are not able to start or steer a session with Copilot in Slack. Copilot uses all messages in the conversation to inform the work. The entire thread becomes the decision-making context for the artifact. Slack Code When you ask Copilot to perform a task, Copilot cloud agent will create a dedicated code channel, called Slack Code . This is where you, and optionally your teammates, can collaborate with Copilot on a task.
Once a code channel is established, steer the session exclusively through that channel. Copilot manages the code channel and displays details about the session, such as the working repositories, branches, issue or pull request links, status, and model in use. Code channels are intended for one session at a time: one channel per task. When the session is finished, you are asked whether you want to archive the channel. After archiving, the channel and its history remain viewable and searchable, and you can reopen the channel if needed.
Secure cloud sandboxes When Copilot cloud agent starts work on a task from Slack, Copilot continues working asynchronously in a secure cloud sandbox , and posts the result when it's ready. You can keep steering from Slack or continue the work on the agent-generated artifacts in GitHub, the terminal, or your preferred code editor. Prerequisites You must have a GitHub account with access to Copilot through a paid Copilot plan.
You must have a Slack account and be a member of a workspace. You must have the GitHub integration for Slack installed. See Integrating GitHub with Slack . If you get Copilot through an organization or enterprise, including an enterprise with managed users, the Copilot in the cloud policy is enabled by default, but an owner can turn it off. Copilot runs your Slack sessions in a cloud sandbox, which doesn't need a separate setting.
See Managing cloud sandboxes for your organization or enterprise . Connecting the GitHub app to your GitHub account The first time you use the GitHub integration in Slack, the app will prompt you to connect it to your GitHub account. Then if prompted, set a default repository. The default repository provides the context that Copilot uses when responding to prompts, and it's also where issues and pull requests created by Copilot cloud agent sessions will be opened unless you specify a repository in your prompt.
You cannot set default repositories for direct messages, so in a direct message, name the repositories in your prompt. To get started: In Slack, open a direct message with the GitHub app or @mention the GitHub app in a thread by typing @GitHub . Follow the prompts to connect your GitHub account, and if prompted, optionally set a default repository. To see what else you can do, in the thread, @mention the app by typing @GitHub help .
Using the GitHub app in Slack You can send the GitHub app direct messages or @mention it in a thread. The bot will respond to your messages and perform tasks based on your requests. You must have write access to every default repository, or every repository specified in your prompt, in order to trigger Copilot cloud agent to work. If you do not have write access to the relevant repositories, you can still help guide Copilot by providing input in the Slack thread, which will be used as context when Copilot cloud agent makes changes in the pull request.
Users can invoke Copilot cloud agent on any repository where they have write access. For enterprise-owned repositories, administrators must install and configure the Slack GitHub app and specify which repositories the Slack app can access. For more information about configuring GitHub Apps, see Installing a GitHub App from GitHub Marketplace for your organizations . In Slack, open a direct message with the GitHub app or @mention the app in a thread by typing @GitHub .
Type your prompt, then send it. You can describe the repository and branch in natural language as part of your request. For example: @GitHub Add "Hello World" to the README in octo-org/octo-repo on the develop branch Copilot cloud agent will initiate a cloud agent session and, once the cloud agent has finished, respond with a summary of the changes it plans to make and a link to the artifacts it has created in the specified repository.
You can also reply to a GitHub notification and mention @GitHub with a task. For example, ask it to investigate a failed workflow or explain the changes in a pull request. The conversation and linked GitHub resources provide context for the work. Working across multiple repositories A session can work with up to 11 repositories owned by the same organization or personal account. You must have write access to every selected repository.
Select the repositories when you start the task, or name them in your prompt. For example: @GitHub Update the API in octo-org/service and its client in octo-org/web. Open a pull request in each repository and link the changes. Review the repository set before work begins. Changing channel defaults affects new conversations, not the repositories of a running session. Creating issues with Copilot You can ask Copilot to create GitHub issues directly from Slack, turning conversations into actionable tasks.
Just describe what you need in natural language, and Copilot creates the issue
The rest of this page is on the live site.