agenticlately · GH-600 Study Prep
Home Phase B Lesson 2.6
PHASE B · LESSON 2.6 · heaviest execution topic

Agents in CI + autonomous actions

Autonomy with fences. An agent can run on its own — invoked inside CI, creating its own branches and PRs — and still be bounded by frontmatter guardrails, a firewall, and setup steps. This is the largest execution topic on the exam; learn the agentic-workflow shape and the autonomy + constraint controls.

~12 minread 4quiz questions Tier 1source cited
Story

So far the worker's been handed tasks. Now picture them running a job on their own: they read the work order, pull materials, do the work — and crucially, they don't just walk into the finished building and hand over the keys. They file a work order (a PR) so a supervisor signs off.

And the site doesn't let them roam free. There's a fence: a firewall limiting where they can reach, a setup crew that preps the trailer before they start (tools installed, power on), and a clock. Autonomy with fences — that's this lesson. An agent can act on its own and be bounded by CI plumbing, a firewall, and setup steps.

The idea, in plain English

Three official sub-skills:

The headline to hold

Agents run inside GitHub Actions (not locally — lesson 2.5), they act autonomously but produce a reviewable PR, and their environment is bounded by setup steps + a firewall.

Agentic workflows = invoking an agent in CI

A traditional workflow lists every step (deterministic — B0.1). A GitHub Agentic Workflow flips it: you write the goal in Markdown and the guardrails in frontmatter, and a coding agent in Actions decides the steps.

Autonomous actions (act on its own → PR)

The agent's autonomy is bounded — it acts, but the result lands as a PR for review. The 7-step flow:

assign task → agent picks repo/branch → analyzes & plans → API creates branch + commits → PR opened → workflows validate → human reviews.

It creates branches and PRs autonomously (the named sub-skill) — but never silently merges to the base.

CLI autonomy controls (memorize):

FlagEffect
--autopilotkeeps running follow-up steps automatically (vs pausing)
--no-ask-userdisables ask_user so it never pauses — essential in CI (a hung prompt stalls the run)
-p / --promptruns a single prompt non-interactively and exits — good for scripting
--modeinteractive | plan | autopilot (can't combine with --autopilot/--plan)

askUser defaults to true (may ask); set false for fully autonomous.

Environment-specific constraints (the fences)

The setup-steps file pre-configures the agent's environment before it starts:

The agent firewall (a key constraint): it limits the agent's outbound network access. You MUST disable it for self-hosted runners (else the agent is blocked), and it doesn't work on Windows — use self-hosted or larger runners with Azure private networking (which needs specific outbound hosts allow-listed).

Worked example — a daily triage agentic workflow
---
on:
  schedule: daily            # trigger: runs every day (automatic)
permissions:
  contents: read             # least-privilege: read code…
  issues: write              # …and write issues
safe-outputs:
  create-issue:
    label: report            # the MOST it may produce
tools: ["read", "search"]    # no edit/execute
---
Review yesterday's failed CI runs and open one summary issue labeled "report".
One-look contrast — the constraint knobs

on = when it runs · permissions/tools = how far it reaches · safe-outputs = what it may produce · setup-steps + firewall = the environment fence around all of it.

The cert-language version

A GitHub Agentic Workflow pairs a Markdown goal with frontmatter guardrails (on, permissions, tools, safe-outputs), compiled to a lock file and run by a coding agent in GitHub Actions — "Continuous AI" that extends CI/CD. The agent acts autonomously (creates branches/commits/PRs) but lands a reviewable PR; in CI use --no-ask-user so it won't hang. Its environment is bounded by copilot-setup-steps.yml (one job, that exact name) and the agent firewall (disabled for self-hosted; absent on Windows).

Our summary · grounded in MS Learn — Agent tooling, MCP, and execution environments + GitHub Docs (Copilot CLI, coding-agent environment) + naim149 study gist · fetched 2026-05-30

Common confusions (read these or lose points)

Ticks this lesson done on the home roadmap. Saved in this browser.

Quiz · Lock it in

0 / 0 answered
Q1 · multiple choice

What best describes a GitHub Agentic Workflow?

Answer · C. Markdown = intent, frontmatter (on/permissions/tools/safe-outputs) = constraints; compiled to a lock file run in Actions. A describes a traditional workflow; agentic workflows extend CI/CD ("Continuous AI"), they don't replace it.
Q2 · multiple choice

You invoke the agent non-interactively inside a CI job. Which flag prevents it from stalling the run?

Answer · B. In CI there's no human to answer prompts, so --no-ask-user (often with -p/--autopilot) stops the agent hanging on ask_user. --allow-all is about permissions; --plan changes the mode; --host is for login.
Q3 · multiple choice

Which is true about the Copilot coding-agent environment?

Answer · D. Exact path + single job named copilot-setup-steps (≤59 min). The firewall doesn't work on Windows and must be disabled for self-hosted runners. Without the file Copilot tries to install deps itself — just slowly/unreliably (fails for private deps).
Q4 · explain back

In your own words: describe an agentic workflow's two parts, how the agent acts autonomously yet safely, and name one environment constraint.

Suggested answer

Two parts: frontmatter (guardrails — on, permissions, tools, safe-outputs) + a Markdown body (the goal), compiled to a lock file run in GitHub Actions. Autonomous yet safe: it picks a branch, makes commits, and opens a PR on its own (the 7-step flow) but never auto-merges — a human/checks review first; in CI you add --no-ask-user so it doesn't hang. Constraint: e.g. the copilot-setup-steps.yml file (one job named copilot-setup-steps) or the agent firewall (disabled for self-hosted, absent on Windows).


  
Source · MS Learn — Agent tooling, MCP, and execution environments + GitHub Docs (Copilot CLI, coding-agent environment) + naim149 study gist · fetched 2026-05-30

Unofficial study material. Not affiliated with, endorsed by, or sponsored by GitHub or Microsoft. “GH-600” and “GitHub” are trademarks of their respective owners, used for identification only.