GitHub Agentic Workflows + OrchStep: the agent decides, the workflow does
GitHub Agentic Workflows is now generally available. Give the agent judgment and give OrchStep the commands: a compiled, allowlisted example where the agent can run exactly one deterministic task and nothing else.
GitHub Agentic Workflows (gh aw) went generally available on October 28, 2026. You write a Markdown file with YAML frontmatter, gh aw compile turns it into a hardened, pinned GitHub Actions workflow, and an AI engine (Copilot, Claude, Codex and others) runs inside a sandbox with read-only permissions. Anything the agent wants to write (an issue, a comment, a pull request) goes through declared safe outputs that a separate job applies.
That is a good security model for what the agent may change on GitHub. It says nothing about what the agent does on the runner. Give an agent a shell and a vague instruction like "check whether we're ready to release", and it will improvise: a different set of commands each run, a different interpretation of "ready", a different token bill.
The fix is a division of labour you may already use locally:
- The agent decides. It reads the issue, picks what to check, interprets failures, and writes a useful comment.
- The workflow does. The actual checks live in a reviewed
orchstep.yml, run identically every time, and are the same checks a maintainer runs on a laptop.
The checks, as a normal OrchStep task
name: release-checks
desc: Deterministic release-readiness checks. The agent runs these; it does not reinvent them.
tasks:
release_check:
desc: Everything that must be true before we tag a release
steps:
- name: changelog_has_unreleased
func: shell
do: grep -q '^## \[Unreleased\]' CHANGELOG.md
- name: no_todo_markers
func: shell
do: |
if grep -rn "TODO(release)" --include='*.go' . ; then
echo "found TODO(release) markers"; exit 1
fi
- name: tests
func: shell
do: go test ./...
retry:
max_attempts: 2
interval: 5sNothing here knows about agents. You can run orchstep run release_check locally, orchstep run release_check --dry-run to see the plan, and orchstep run release_check --output json to get a machine-readable result.
The agentic workflow
Save this as .github/workflows/release-check.md:
---
on:
workflow_dispatch:
issues:
types: [labeled]
engine: claude
permissions:
contents: read
network:
allowed:
- defaults
- github
steps:
- name: Install OrchStep
uses: orchstep/setup-orchstep@v1
with:
install-dir: ${{ runner.tool_cache }}/orchstep/bin
tools:
bash: ["orchstep:*"]
safe-outputs:
add-comment:
max: 1
---
# Release readiness check
You are triaging a release-readiness request.
1. Run `orchstep list-tasks` to see the deterministic checks this repository defines.
2. Run `orchstep run release_check --output json`. Do not run any other task, and do not
try to reproduce the checks yourself: the workflow is the source of truth.
3. Read the JSON result. For each failed step, explain the likely cause in one sentence,
quoting the step name and its error.
4. Post a single comment summarising: overall status, failed steps with explanations,
and the exact command a maintainer can run locally to reproduce (`orchstep run release_check`).Then compile it:
gh extension install github/gh-aw
gh aw compileWe compiled exactly this file with gh aw v1.2.2. The compiler pins orchstep/setup-orchstep to a commit SHA in the generated .lock.yml, and translates the allowlist into the engine's tool permissions as Bash(orchstep:*). On the first compile it asks you to approve the new action and secrets it found. That is the point, so read the list before you pass --approve. The Claude engine needs an ANTHROPIC_API_KEY repository secret, and the default Copilot engine needs a Copilot license.
What each piece buys you
| Piece | Why it is there |
|---|---|
tools: bash: ["orchstep:*"] | The agent's shell is limited to the orchstep command family, so it cannot improvise rm, curl or a different test command. Per the gh-aw docs, command allowlists are enforced for the Copilot, Claude, Gemini and Pi engines (Codex can disable the shell but cannot enforce an allowlist). |
steps: with setup-orchstep | Custom steps run before the agent, outside the firewall sandbox, so the install happens with normal Actions networking. |
install-dir: .../orchstep/bin | The generated lock file rebuilds the agent's PATH from bin directories in the runner tool cache, so we install the binary into one. |
permissions: contents: read | The agent job stays read-only. |
safe-outputs: add-comment | The only write the agent can request is one comment, applied by a separate job. |
The result is three layers of constraint that compose: GitHub decides what the agent may write, the allowlist decides what it may execute, and orchstep.yml (reviewed in a pull request like any other code) decides what that execution actually does.
Why not let the agent run the commands directly?
You could list go, grep and friends in the allowlist and describe the checks in the prompt. Three things go wrong over time:
- Drift. The prompt is now a second, unversioned copy of your release process. Someone updates the Makefile; the prompt keeps checking the old thing.
- Non-determinism. Two runs on the same commit can execute different commands. When the check fails, you cannot rerun "the same check" locally, because there is no such thing.
- Cost. Every run pays tokens to rediscover steps that never change. With OrchStep the agent pays only for the judgment part (deciding and explaining), never for re-deriving the commands.
With the checks in orchstep.yml, a failure in CI is reproducible with one command on a laptop, and the agent's comment can tell the maintainer exactly which one.
Variations
- Scheduled health report. Swap the trigger for a schedule and the safe output for
create-issue, and the agent files a summarised issue only whenorchstep run nightly_checksfails. - Preview before acting. Allow the agent to run
orchstep run <task> --dry-run --output jsonfirst and include the rendered plan in its comment, so a human sees the exact commands before anyone runs the real thing. - Same checks, no agent. For runs that need no judgment, skip the agent entirely and use the plain
orchstep/run-orchstepaction. The task does not change.
Get started
- Install OrchStep and put your checks in an
orchstep.yml. - Run them locally until they are boring.
- Add the agentic workflow above, compile it, approve, commit both files.
Building workflows with an agent? The OrchStep plugin for Claude Code installs the workflow-design and capture skills in one command, so the agent writes the orchstep.yml for you from the scripts you already have.
curl -fsSL https://orchstep.dev/install.sh | sh