MSBA-370 · Lesson 8 of 12 · 18 min

The GitHub Copilot cloud agent

▶ Video coming soon A video version of this lesson is on the way.

By the eighth session the team had used GitHub's cloud agent on a dozen small tasks, and Malik had started a page in Tidewater's engineering notes titled "Things the cloud agent does that I did not expect". The first entry was its name. Earlier Tidewater notes, and the first Copilot course, called it the coding agent; GitHub's documentation now called it the Copilot cloud agent. In April 2026 GitHub announced the new name alongside features that went beyond writing code: it could now research a question about a codebase, produce a plan for approval, and work on a branch without opening a pull request. This lesson describes the cloud agent as it stood in late 2026, from assignment to merge.

Availability and enablement

GitHub describes the cloud agent as included with all paid Copilot plans. Individuals on Copilot Pro and Pro+ can use it in their own repositories. For Copilot Business and Enterprise, an administrator must enable it before anyone can use it, at enterprise or organization level, and organization owners can choose which repositories it may work in. Tidewater, on Copilot Business through its GitHub Team organization, had enabled it only for the TrailCheck repository and Malik's open-trail-report action during the earlier Copilot pilot. For this course Priya added the trail-units action as well.

Assigning work

Work reaches the cloud agent through several entry points, and all of them end in the same kind of session. A person with write access can assign an issue to Copilot, just as they would assign it to a colleague. They can start a task from the agents panel or a repository's Agents tab on GitHub.com, from Copilot Chat in an editor or on GitHub.com, from Copilot CLI, from GitHub Mobile, or from integrations that GitHub supports with tools such as issue trackers and chat apps. Whatever the entry point, the person can choose a custom agent if the repository has any, and in some cases a model.

Several entry points on the left: an issue assigned to Copilot, the agents panel on GitHub.com, Copilot Chat in an editor, Copilot CLI, GitHub Mobile and third-party integrations. All arrows lead to a single box labeled agent session in a cloud environment, which produces a branch, commits, a session log and optionally a pull request.
Many entry points, one kind of session.

What happens in a session

When a session starts, GitHub prepares a cloud environment powered by GitHub Actions: it starts from a runner image, runs the repository's copilot-setup-steps job if there is one, clones the repository and starts the agent with the task, the repository's custom instructions and any custom agent's instructions. The agent then works through the loop from lesson 3, using its built-in tools, the GitHub MCP server, a browser automation server and any other MCP servers the repository configured. As it works it pushes commits to its own copilot/ branch and keeps a session log that anyone with access can watch live or read afterwards.

The stages of a cloud agent session in 2026.
StageWhat the agent doesWhat people see
StartPrepares the environment, reads instructions and the taskA new session in the agents panel
Research or plan (optional)Investigates the codebase or proposes a planA research answer or plan to approve
WorkReads, edits, runs tests and builds, commits to its branchLive session log and commits
FinishSummarizes the change and opens or updates a pull request if askedA pull request with a summary and the log
IterateResponds to review comments that mention itNew commits and a new session log entry

Research, plan and code

The April 2026 update gave the cloud agent three modes of work that the GH-600 outline maps to cleanly. In a research session it answers broad questions about the codebase, grounded in the repository, without changing anything, which is useful for design and for understanding unfamiliar code. When asked for a plan, it proposes an approach and waits; a person approves it or asks for changes, and no code is written until the plan is approved. In a coding session it implements the change. GitHub also removed the requirement that every session end in a pull request: the agent can commit to a branch, the person can review the full diff and keep iterating, and then create the pull request with one click, or ask in the prompt for a pull request at the end.

Worked problem

Plan first, then code

Malik asked the cloud agent, in the trail-units repository, to "support yards as an output unit". He asked for a plan first. The plan proposed adding yards to the conversion table, updating the input validation, adding tests and rebuilding the bundled dist folder, and also proposed renaming the existing feet constant. What should he do?

Show solution
  1. Approve the conversion, validation, tests and rebuild, which match the task.
  2. Ask the agent to drop the rename, which is unrelated and would change the action's public behavior.
  3. Once the revised plan is approved, let the agent code it and review the resulting diff against the plan.
  4. The plan caught the scope creep before any code existed, which is the reason to ask for one.

Steering and review

People steer the cloud agent through the same tools they use with colleagues. They comment on the pull request or the session, mention Copilot in a review comment to ask for a change, and the agent starts a new piece of work in response. They can stop a session that is going in the wrong direction. Every change is visible as commits on the branch, which GitHub signs, and the session log shows the commands the agent ran and the files it read, which is often where a reviewer finds the reason for a strange change.

GitHub's safeguards for agent pull requests are part of the exam's guardrails domain and worth knowing exactly. The agent cannot push to the default branch or to branches it did not create. Branch protection rules and rulesets apply, including required reviews and required checks. Where approval is required, the person who asked the agent to do the work cannot approve its pull request, so a second person always looks. And GitHub Actions workflows on the agent's pull requests do not run until someone with write access allows them, because those workflows may have access to secrets. Organizations can relax some of these behaviors, and Tidewater chose not to.

A pull request box from a copilot branch with four gates in sequence: workflows waiting for approval to run, required checks, review by someone other than the requester, and merge by a person. A side arrow labeled mention Copilot in a comment loops back to the agent, which pushes new commits.
The gates on a cloud agent pull request and the loop for requesting changes.

Visibility for administrators

GitHub's enterprise AI controls, generally available since February 2026, gave administrators one place to see and govern agent activity. An agent sessions view lists sessions across the enterprise, including third-party agents, and audit log entries record an agent identifier and the user the agent acted for, with events when sessions start, finish or fail. Copilot usage metrics gained cloud agent fields in April 2026. Seraphine used these at Skerry to answer the question auditors ask first: which changes in production code were written by an agent, who asked for them and who approved them.

Cost and limits

Each cloud agent session consumes Copilot usage, which GitHub bills against the account's AI credits, and runs on GitHub Actions infrastructure. GitHub publishes how sessions are metered and the plan allowances, and both have changed several times, so teams should read the current billing documentation rather than rely on a figure from a course. Lesson 11 covers how to estimate and control the cost. The practical limits are stable: one repository per task, one branch per task, work only in the repository's own environment, and results returned for human review.

Writing tasks for the cloud agent

The cloud agent reads the issue or prompt it is given as its task, together with comments on the issue at the time it starts. A good task for it reads like a good task for a new colleague who is capable but knows nothing about the history. It says what the problem is, where to look, what done means and what not to change. It links to failing runs, error messages or related pull requests. It avoids instructions that depend on unstated context, such as "fix it the way we discussed". Malik found that tasks of four to eight sentences with a short done list produced the best results; one-line tasks invited guessing, and long essays buried the important parts.

Rewriting tasks so the cloud agent can succeed.
Weak taskStronger task
Fix the units bugConverting 0 miles returns NaN. Expected 0. See src/convert.js; add a test for zero.
Improve the READMEAdd a usage example for the precision input to the README, matching action.yml.
Update dependenciesUpgrade the test runner to the current major version; keep all tests passing; no other upgrades.

Choosing a model and an agent

Depending on plan and policy, the person starting a cloud agent session may be able to choose the model it uses and a custom agent to run. Organization policies decide which models are available, and some models count more heavily against usage than others. Tidewater left the default model for most tasks and chose a stronger one for research sessions on unfamiliar code. Choosing a custom agent mattered more than choosing a model: the test-writer agent's narrower tools and instructions changed results more than any model switch the team tried.

When a session goes wrong

Sessions fail in a handful of recognizable ways. Some never start properly, usually because setup steps fail; the session log shows the failing step, and the fix belongs in copilot-setup-steps. Some run into the firewall, which leaves a warning naming the blocked destination. Some finish with a change that does not meet the task, which a review comment can often correct. And some wander, touching files unrelated to the task; these are usually better stopped and restarted with a clearer task than steered back. Malik's notes page grew a short section for each pattern, with the log lines that identified it.

Agent pull requests in team routines

Agent pull requests arrive with the agent as author, the person who started the session recorded, and a summary written by the agent. Tidewater added two habits to its review routine. The reviewer starts with the session log's summary of commands run and files changed, before reading the diff. And the reviewer checks that the change matches the task and nothing more: an agent pull request that also tidies unrelated code is sent back, however good the tidying, because unrequested changes are the hardest to review. Both habits came from Lena's first month of reviewing agent work.

Copilot CLI and the cloud agent

Copilot CLI, generally available since early 2026, runs an agent in the developer's terminal and can also hand work to the cloud agent. That gives a developer a choice in the same tool: work on a change locally with the agent while watching each step, or delegate it to a cloud session and carry on with something else. Copilot CLI asks before running commands or changing files unless the user has allowed specific tools, and offers a plan mode that proposes an approach before acting. Malik used it for small local tasks in open-trail-report and delegated anything that needed a long test run to the cloud agent.

Research sessions in practice

Research sessions turned out to be the cloud agent feature Tidewater used most after coding. Before changing TrailCheck's map tile loading, Lena asked a research session to explain how tiles were requested, cached and invalidated, with links to the relevant files. The answer was not perfect, but it was a good map of where to look, and it changed nothing in the repository. Priya noted that research sessions were also a safe way for new contributors to learn the codebase, because the worst outcome of a wrong answer was a wasted hour of reading.

Common mistakes

  • MistakeExpecting the cloud agent to be available as soon as a Business seat is assigned.

    InsteadAn administrator must enable it for Business and Enterprise first, and can limit which repositories it uses.

  • MistakeApproving your own agent's pull request.

    InsteadThe person who asked for the work cannot be the approver where approval is required.

  • MistakeLetting workflows on agent pull requests run automatically by default.

    InsteadKeep the approval step unless you have checked what those workflows can access.

  • MistakeSkipping the session log during review.

    InsteadRead it to understand why the agent made each change.

Summary and key terms

  • The Copilot cloud agent, formerly the Copilot coding agent, is included with paid Copilot plans and must be enabled by administrators for Business and Enterprise.
  • Work can be assigned from issues, the agents panel, Copilot Chat, Copilot CLI, GitHub Mobile and integrations.
  • Sessions run in a cloud environment powered by GitHub Actions, push signed commits to copilot/ branches and keep a session log.
  • Since April 2026 the agent can research, produce plans for approval and work on a branch before a pull request is created.
  • Safeguards include no pushes to the default branch, a different person approving, and workflows that wait for approval; administrators see sessions and audit entries in the enterprise AI controls.
Agent session
One run of an agent on a task, with its own environment, log and status.
Session log
The record of an agent session's steps, commands and file reads.
Agents panel
The GitHub.com interface for starting and tracking agent sessions.
Research session
A cloud agent session that answers questions about a codebase without changing it.
Enterprise AI controls
GitHub's administration area for AI policies, agent sessions and audit, generally available since February 2026.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. What was the cloud agent called before 2026?

    Show answer

    The Copilot coding agent.

  2. Who cannot approve a cloud agent pull request where approval is required?

    Show answer

    The person who asked the agent to do the work.

  3. What happens before a plan-first session writes code?

    Show answer

    A person approves the plan or asks for changes.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz