GitHub Agentic Workflows guide — how much it restricts coding agents in GitHub Actions
Read-only agent jobs, declared safe outputs and a 1,000-credit ($10) cap per run: what GitHub Agentic Workflows' defaults stop, and what they don't.
On this page
GitHub Agentic Workflows (GitHub's official Korean-language docs translate the name as "agent workflows") lets you write instructions in markdown in .github/workflows/, compile them into GitHub Actions workflows, and run them with a coding agent such as GitHub Copilot, Claude Code, OpenAI Codex or Google Gemini. GitHub opened it as a technical preview on February 13, 2026 and moved it to public preview on June 11; as of September 16, when this report was written, it is still in preview. Rather than a getting-started tutorial, this report reads the official docs' defaults for what the agent is allowed to do and what is blocked: how much each of read-only permissions, safe outputs, the network firewall, threat detection and the AI credit cap guarantees, and which limits the docs themselves disclose. [1] [3]
1. Executive summary
the Copilot billing unit: 1 AIC = $0.01, so $10 [1][6]
Writes are done by a separate job after validation [3]
Codex, Gemini, Pi [5]
First, some terms. GitHub Actions is GitHub's automation service that runs workflows in response to repository events. A coding agent is a program that takes natural-language instructions, reads files, runs commands and works through multiple steps on its own; Copilot CLI, Claude Code and Codex are examples. Safe outputs are the mechanism by which the agent, instead of writing to GitHub directly, emits a structured request such as "create one issue"; a separate job that holds the write permissions validates and executes it. AI Credits (AIC) are GitHub Copilot's unit of usage-based billing; 1 AIC is one US cent. [1] [4]
Every number in this report is a default from GitHub's official docs, checked on 2026-09-16. We made no measurements of our own, and because the feature is in preview, defaults and commands may change. We kept what the docs describe as design separate from what they state as a guarantee.
2. What GitHub Agentic Workflows is
The official docs define it as "AI-powered repository automations that you define in markdown and run as GitHub Actions workflows." Where conventional Actions execute fixed conditions and commands exactly as written, an agentic workflow reads context such as an issue body or a CI log and decides what to do. The docs cite issue triage, automated PR review, CI failure investigation, documentation maintenance, code quality improvement and security review as uses. [1] [2]
It works in two stages. A workflow file consists of YAML frontmatter (when to run and what to allow) and a markdown body (natural-language instructions for the agent). Compiling the file with gh aw compile produces a .lock.yml next to it, and this lock file is what Actions actually runs. You commit both files. You can edit the markdown body on the GitHub website, but changing the frontmatter requires recompiling. [8]
| Item | Details | Source |
|---|---|---|
| Release timeline | 2026-02-13 technical preview → 2026-06-11 public preview. "in public preview and subject to change" | [1][9][10] |
| Tooling | GitHub CLI extension gh aw. Repository github/gh-aw, MIT license. Five releases, from v0.89.10 to v0.89.15, in just the two days of 2026-09-13 to 09-14 | [9][11] |
| Supported engines | GitHub Copilot CLI (default), Claude Code, OpenAI Codex, Google Gemini CLI, Pi. Set with engine: in the frontmatter | [5] |
| Prerequisites | Actions enabled, an engine account (a Copilot plan or the vendor's API key), GitHub CLI 2.0 or later, write access to the repository | [1][7] |
| Runners | The execution environment (runner) must be Linux. macOS runners cannot be used because they do not support the container jobs the firewall sandbox needs. GitHub Enterprise Server (GHES) runs in a --ghes compatibility mode | [8] |
| Cost components | GitHub Actions runtime billing + the engine's inference cost (AI credits). The Copilot engine can be billed to the organization; third-party engines are billed directly by each vendor | [1][6] |
Each engine authenticates differently. For Copilot, granting copilot-requests: write in the workflow permissions bills the organization through the default GITHUB_TOKEN. For the others you add a repository secret: ANTHROPIC_API_KEY for Claude Code, CODEX_API_KEY or OPENAI_API_KEY for Codex, and GEMINI_API_KEY for Gemini. The docs say Copilot has the broadest support for engine-specific features such as agent selection, a custom execution harness and resuming interrupted runs. That is the vendor's own description. [5]
3. Installation and a first workflow
The official quick start has five commands: install the extension, add a prebuilt workflow with a wizard, compile it, run it, and check its status. [7]
| Step | Command | What it does |
|---|---|---|
| Install | gh extension install github/gh-aw | Adds the gh aw extension to GitHub CLI |
| Authenticate | gh auth login --scopes repo,workflow | Logs in with scopes that can write workflow files |
| Add | gh aw add-wizard githubnext/agentics/repo-status | Interactively imports a workflow from the sample repository |
| Compile | gh aw compile | Converts the markdown into .lock.yml. Rerun it every time you change the frontmatter |
| Run and check | gh aw run repo-status · gh aw status | Manual run and status check. You can also run it from the Actions tab |
The table below summarizes the frontmatter of an example published on docs.github.com. The workflow reviews issue activity every Monday and creates one issue; the keys and values are exactly as in the docs. [12]
| Frontmatter | Meaning |
|---|---|
on: weekly on monday | A natural-language schedule, compiled into cron |
permissions: issues: read · copilot-requests: write | Issues are read-only. The Copilot requests permission bills the organization |
network: defaults | Only the default allowed domains. See section 5 |
tools: github: toolsets: [issues] | Limits the GitHub toolsets exposed to the agent to issues |
safe-outputs: create-issue: | Declares "create issue" as the only write operation. Default maximum of 1 |
The body tells the agent to review the last 7 days of issue activity and create an issue with the number of opened and closed issues, recurring themes, issues that need attention, and two or three recommendations for maintainers, keeping it concise. The part that deserves attention is the frontmatter, not the body. The only write this workflow can make to the repository is creating one issue, and even that is not done by the agent: the agent leaves a request, and another job creates the issue. The sample repository githubnext/agentics has more workflows, such as issue triage, CI failure investigation, cost tracking and a daily malicious-code scan. The docs say: "Only import workflows from sources you trust, and review what a workflow does before adding it to your repository." [13] [12]
4. Control 1: read-only permissions and safe outputs
The security architecture doc describes these controls in three layers. The first layer is the runner plus container and virtualization isolation; the second is compile-time validation (schema checks, an expression allowlist, SHA pinning of actions); the third splits the run into separate stages at run time. This report treats the third layer as the most important. Paraphrasing the doc: the agent has no direct write access to external systems, and write operations run only in a separate job after the agent has finished. The agent job's default permissions are contents: read, issues: read and pull-requests: read. [3]
Writes go only through safe outputs. The frontmatter declares which write operations are allowed and the maximum number of each; during the run, the agent can only leave requests in those formats. The requests pass through a threat detection job and are then executed by a job that has write permissions. The docs' default caps are below. [4]
| Safe output | What it does | Default max per run |
|---|---|---|
create-issue | Creates an issue. Can set labels and assignees | 1 |
add-comment | Comments on an issue, PR or discussion | 1 |
create-pull-request | Creates a PR with code changes. Checks protected files | 1 |
create-pull-request-review-comment | Inline PR review comments | 10 |
add-labels · remove-labels | Adds or removes labels | 3 |
add-reviewer | Assigns reviewers | 3 |
close-pull-request | Closes a PR without merging | 10 |
update-project | Updates project boards and fields | 10 |
create-code-scanning-alert | Submits security findings in SARIF format | Unlimited |
Defaults from the safe outputs reference. There are other kinds not in the table (updating and closing issues, creating discussions, milestones, updating releases, check runs and more), and most default to 1. The caps can be changed in the frontmatter.
Here is what this structure actually stops and what it does not. It stops an agent that has been fooled by its instructions or by an issue body from making arbitrary writes. A kind of write that was not declared has no job to execute it, and declared kinds still hit the count cap. It does not stop an allowed write from having the wrong content. If you allow one issue to be created, the structure does nothing about that issue's content being off the mark. The same goes for bad code in a PR if you allow PR creation. That part is left to the threat detection in section 5 and to human review. How to review PRs that AI created is covered in our report on the quality of AI-written code.
5. Control 2: network firewall, sandbox, threat detection
Network. If the frontmatter has no network:, network: defaults applies, which allows only basic infrastructure domains such as certificates, JSON schema, Ubuntu, major package mirrors and Microsoft domains. On top of that you can add ecosystem names such as python, node and github or individual domains, and take domains out with blocked. The Agent Workflow Firewall (AWF) enforces this network restriction. According to the architecture doc, it uses iptables to redirect HTTP and HTTPS traffic to a Squid proxy container that applies the domain allowlist, "to prevent data exfiltration." It is on by default for all engines and can be turned off, but the docs say to "keep it enabled in production." [14] [3]
Sandbox. The architecture doc describes the first layer as Docker, gVisor and KVM isolation on GitHub-hosted runners or Linux self-hosted runners, and the September 7 weekly update says the workflow runtime is being moved to Cloud Hypervisor-based microVMs. Our agent sandbox report covers why operational settings decide the outcome more than the relative strength of the isolation method itself. [3] [15]
Input sanitization. When text written by outsiders, such as an issue body, reaches the agent, @user mentions are wrapped in code formatting so no notification goes out, auto-linking phrases such as fixes #123 are neutralized, XML tags are rewritten into forms like (script), and URLs from untrusted domains are replaced with (redacted). These measures limit the impact of prompt injection (an attack that steers the agent with instructions hidden in external text); they do not eliminate injection itself. [3]
Threat detection. Before safe outputs are executed, a separate job inspects what the agent produced (issue, comment and PR bodies, and git patches). It checks for three things: prompt injection, secret leaks and malicious patches. By default, the same AI engine as the main workflow returns a JSON verdict. If a threat is found, the detection job fails and the safe output jobs are skipped. You configure it with threat-detection: on each output kind under safe-outputs in the frontmatter. Inside it, max-ai-credits sets a budget separate from the main agent's, and engine: false turns off the AI verdict so that only scanners you add yourself are used. The docs say: "Detection does not inherit the main agent’s budget — both caps apply independently to their respective jobs." [16]
The architecture doc also describes the limits of this design. If the first layer (runner and isolation) is breached, "higher-level security guarantees may not hold," and the doc states that compromise of hardware or cryptographic primitives, and side-channel and covert-channel attacks, are out of scope. Of the second layer it says: "Security violations arise due to misconfigurations, overly permissive specifications, and limitations of the declarative model." In other words, how strong the controls are comes down to how narrowly you write the frontmatter. [3]
6. Control 3: AI credits and cost structure
Cost has two parts: GitHub Actions minutes (runner time) and the engine's inference cost. Inference is counted in AI credits. GitHub Copilot moved to usage-based billing on June 1, 2026, and now counts credits by token usage instead of by number of requests. Copilot Pro includes $10 of credits in its $10 monthly fee, and Business includes $19 of credits in its $19 per-user fee. Code completions do not use credits. [17] The agentic workflows docs state 1 AIC = $0.01 and set the default caps below. [6]
| Default cap | Value | Frontmatter key | Meaning |
|---|---|---|---|
| AI credits per run | 1,000 AIC ($10) | max-ai-credits | Inference cost a single run may spend |
| AI credits per workflow per day | 5,000 AIC ($50) | max-daily-ai-credits | Cumulative cap over a 24-hour window. This is the default guardrail value in the cost management doc; the frontmatter reference gives this key's default as disabled, so the two docs disagree (section 9) |
| Agent step timeout | 20 min | timeout-minutes | The step in which the agent generates model responses and calls tools |
| Timeout for the whole generated job | 60 min | — | Includes setup, detection and safe outputs |
| Conversation turns | 500 | max-turns | Cap on the iterations of model responses and tool calls |
Values from the cost management doc and the frontmatter reference. The dollar amounts are derived values we calculated at 1 AIC = $0.01. The daily cap of 5,000 AIC appears in the cost management doc's list of default guardrails, while the frontmatter reference describes the default of max-daily-ai-credits as disabled, so the two docs read differently. See section 9.
The $10 per run is a cap, not an expected cost. Actual usage depends on model pricing and context size. The docs give four ways to lower cost: use skip-if-match and skip-if-no-match to filter on conditions before the agent is started, so it does not run at all; use a cheaper model (gpt-4.1-mini and claude-haiku-4-5 are the examples); batch work into scheduled runs instead of reacting to every event; and set concurrency and rate limits. Actions minutes are billed per job, rounded up, so run time is cost. [6]
Who pays depends on the engine. With the Copilot engine, the copilot-requests: write permission draws on the organization's Copilot credits. With Claude, Codex and Gemini, each vendor bills the account behind the API key stored as a repository secret. The threat detection job also uses inference, so its cost is charged on top. [1] [16] General principles for cutting token cost are covered in our prompt caching report.
7. Where it fits and where it doesn't
Going by the docs and samples, the target is clear: repetitive work that is hard to handle with fixed rules alone but easy to undo when it goes wrong. That means labeling issues, reading CI failure logs and leaving likely causes as a comment, summarizing weekly activity in an issue, and proposing fixes to stale docs as a PR. Because the output is an issue, a comment or a PR, a person can look at it and throw it away.
| Good fit | Poor fit | Why |
|---|---|---|
| Issue triage, marking duplicates, labeling | Closing issues automatically | Closing is possible through safe outputs, but a wrong call directly costs user experience |
| Commenting likely causes of a CI failure | Auto-merging PRs that edit the CI configuration | The controls reach as far as PR creation. The merge decision belongs to a person |
| Weekly reports, suggested doc updates | Triggering releases or deployments | There is no deploy among the safe output kinds, and there should not be |
| Security scan results as code scanning alerts | Tasks that take in a lot of external data | Issue bodies and web content are injection paths. Input sanitization is a mitigation that lowers the chance of an attack; it does not block it completely |
This table is our judgment, based on the scope of the controls in the official docs and on the sample workflows. The docs have no list of what the feature is not suited for.
One more selection criterion: the feature has the least friction in organizations that already use Copilot. Authentication is handled by the GITHUB_TOKEN, billing rolls into the organization's credits, and, as the docs state, Copilot has the widest engine-specific feature support. If you use Claude Code or Codex as the engine, you have to put an API key in a secret and manage the cost separately. Either way, macOS runners cannot be used.
8. Checklist to apply today
- Start with one task that is easy to undo. Pick something whose result stays in an issue or a comment, such as issue labeling or a weekly summary. Import a sample with
gh aw add-wizard githubnext/agentics/<name>, but read its frontmatter before adding it. - Declare as few safe outputs as possible. Only the kinds you need, with the default count caps (mostly 1) left in place. When you enable
create-pull-request, check the protected-files list. - Start the network at
defaultsand add only the ecosystems you need. Do not turn off the firewall. If you need to open an internal API, add it by domain, and list what to exclude underblocked. - Use a different engine for threat detection than for the main workflow. Under
safe-outputsin the frontmatter, set another engine in the relevant output'sthreat-detection: engine:, or put your own scanner in front withsteps. - Set cost caps explicitly. Write
max-ai-creditsandmax-daily-ai-creditsinto the frontmatter, and prefer scheduled runs over event triggers. For Actions minutes, run time is cost. - Filter on trigger conditions first. Use
skip-if-matchso the agent is not started when label or title conditions do not match. - Commit the lock file too, and recompile whenever you change the frontmatter. The
.lock.ymlis the file that actually runs. Because this is a preview, aftergh aw upgradeyou also need to update your workflows withgh aw update. - Record cost and results. Like the sample Cost Tracker, log per-run spend in PRs, and count the share of suggestions that people actually adopted. If the adoption rate is low, narrow the trigger conditions before you rewrite the instructions.
9. What this is not yet
- This report summarizes the official docs; we made no measurements of our own. We could not find independent measurements of how much the controls actually stop, or of how many injections threat detection catches. The docs do not give a detection accuracy either.
- It is a public preview. GitHub itself says it is "subject to change," and the repository shipped five releases in the two days of September 13–14. The commands, keys and defaults in this report are as of 2026-09-16.
- The default daily cap reads differently depending on the doc. The cost management doc lists "5000 AI Credits per workflow per day" as a default guardrail, while the frontmatter reference describes the default of
max-daily-ai-creditsas disabled. You would need to run a workflow to confirm which of the two is the actual default. - The Copilot credit allowances are the plan descriptions from GitHub's official blog, and the docs give no figure for how much of that allowance an agentic workflow run uses up. The per-run cap of 1,000 AIC is a cap, not an average.
- The official Korean-language docs appear to be machine-translated. The Korean edition of this report took its Korean terms for "agentic workflows" and "safe outputs" from those docs, but some of their sentences read awkwardly. For the exact meaning we relied on the English docs.
- The "good fit / poor fit" table in section 7 is our judgment. The docs only list uses; they have no list of poor fits.
- The sandbox migration (to microVMs) is a change in progress. The September 7 weekly update describes it as "moving the workflow fleet onto Cloud Hypervisor-based microVMs," and we could not confirm which runners it has reached, or when.
- We did not calculate the cost of Actions minutes, because it varies by runner type and plan.
10. Sources
All checked on 2026-09-16. Every source is GitHub's own documentation, changelog or repository: the vendor's description, not an independent measurement. This report reproduces defaults and commands as written and labels judgments as judgments.
| Source | What we checked | Scope of the evidence |
|---|---|---|
| [1] GitHub Docs · About GitHub Agentic Workflows | Definition, public preview status, prerequisites, 4 engines (this page does not list Pi; the count of 5 follows the engine reference in [5]), the two cost components, 1 AIC = $0.01, default of 1,000 AIC per run | Vendor docs. A Korean-language edition also exists |
| [2] gh-aw docs · What are Agentic Workflows? | Definition and list of uses | Vendor docs |
| [3] gh-aw docs · Security Architecture | Three-layer model, read-only default permissions, writes separated into their own job, input sanitization, how AWF works, attacks out of scope | Vendor docs. A description of the design |
| [4] gh-aw docs · Safe Outputs | Safe output kinds and default maximum counts | Vendor docs |
| [5] gh-aw docs · Engines | The 5 engines, authentication keys, the description of Copilot's feature coverage | Vendor docs |
| [6] gh-aw docs · Cost Management | Default guardrails (1,000/5,000 AIC, 20/60 minutes), ways to cut cost | Vendor docs |
| [7] gh-aw docs · Quick Start | Install, add, compile and run commands; prerequisites; committing the lock file | Vendor docs |
| [8] gh-aw docs · FAQ | No macOS runners, GHES compatibility mode, when recompiling is needed, who gets billed | Vendor docs |
| [9] GitHub Changelog · Technical preview (2026-02-13) | First release; read-only, sandbox, SHA pinning, safe outputs; MIT open source | Vendor announcement |
| [10] GitHub Changelog · Public preview (2026-06-11) | Move to public preview, layered safeguards | Vendor announcement |
| [11] github/gh-aw · Releases | v0.89.10–v0.89.15 (2026-09-13 to 09-14) | Repository record |
| [12] GitHub Docs · Creating GitHub Agentic Workflows | Full example workflow, how to compile and run, the caution about trusted sources | Vendor docs |
| [13] githubnext/agentics | List of sample workflows (issue triage, CI Doctor, Cost Tracker and others), update commands | Vendor sample repository |
| [14] gh-aw docs · Network | What network: defaults covers; ecosystem, domain and block lists; AWF on by default | Vendor docs |
| [15] gh-aw blog · Weekly Update 2026-09-07 | v0.88.4, firewall hardening, the move to Cloud Hypervisor microVMs, policy blocks reclassified as skipped rather than failed | Vendor blog |
| [16] gh-aw docs · Threat Detection | The three check items, default engine, behavior when a threat is detected, separate budget, engine: false | Vendor docs |
| [17] GitHub Blog · Copilot is moving to usage-based billing (2026-04-27) | Switch to usage-based billing on 2026-06-01, credits included in each plan, code completions excluded | Vendor announcement |
Editorial basis: defaults and commands from the docs are reproduced as written; what each control stops and what it does not stop are written up separately; and where the docs give conflicting defaults, we did not decide which is right and left the conflict in the limits section.