Concurrency Control
GitHub Agentic Workflows uses dual-level concurrency control to prevent resource exhaustion and ensure predictable execution:
- Per-workflow: Limits based on workflow name and trigger context (issue, PR, branch)
- Per-engine: Limits AI execution across all workflows via
engine.concurrency
Per-Workflow Concurrency
Section titled “Per-Workflow Concurrency”Workflow-level concurrency groups include the workflow name plus context-specific identifiers:
| Trigger Type | Concurrency Group | Cancel In Progress |
|---|---|---|
| Issues | gh-aw-${{ github.workflow }}-${{ issue.number }} | No |
| Pull Requests | gh-aw-${{ github.workflow }}-${{ pr.number || ref }} | Yes (new commits cancel outdated runs) |
| Push | gh-aw-${{ github.workflow }}-${{ github.ref }} | No |
| Schedule/Other | gh-aw-${{ github.workflow }} | No |
This ensures workflows on different issues, PRs, or branches run concurrently without interference.
Per-Engine Concurrency
Section titled “Per-Engine Concurrency”The default per-engine pattern gh-aw-{engine-id} ensures only one agent job runs per engine across all workflows, preventing AI resource exhaustion. The group includes only the engine ID (copilot, claude, codex) and gh-aw- prefix—workflow name, issue/PR numbers, and branches are excluded.
jobs: agent: concurrency: group: "gh-aw-{engine-id}"Custom Concurrency
Section titled “Custom Concurrency”Override either level independently:
---on: pushconcurrency: # Workflow-level group: custom-group-${{ github.ref }} cancel-in-progress: trueengine: id: claude concurrency: # Engine-level group: "gh-aw-claude-${{ github.workflow }}"tools: github: allowed: [list_issues]---Related Documentation
Section titled “Related Documentation”- AI Engines - Engine configuration and capabilities
- Frontmatter - Complete frontmatter reference
- Workflow Structure - Overall workflow organization