-
Notifications
You must be signed in to change notification settings - Fork 142
Document rate limiting controls for preventing runaway agentic workflows #15023
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
69231a4
a7a94a0
8a0065c
cb4de45
ebaa8bd
8d8cb1e
17ccbd2
3e0df53
89321a4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,170 @@ | ||||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||||
| title: Rate Limiting Controls | ||||||||||||||||||||||||||||||||||||||
| description: Built-in protections to prevent runaway agentic workflows and exponential growth. | ||||||||||||||||||||||||||||||||||||||
| sidebar: | ||||||||||||||||||||||||||||||||||||||
| order: 1450 | ||||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| GitHub Agentic Workflows uses defense-in-depth to prevent runaway workflows: bot non-triggering, concurrency controls, timeouts, rate limiting, read-only agents, safe output limits, built-in delays, and manual review gates. | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| ## Bot Non-Triggering | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| The `github-actions[bot]` account does not trigger workflow events. When a workflow creates an issue or posts a comment via safe outputs, it won't trigger other workflows - preventing infinite loops. | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| ```yaml wrap | ||||||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||||||
| issues: | ||||||||||||||||||||||||||||||||||||||
| types: [opened] | ||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| This workflow won't be triggered by issues created by safe outputs. | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+12
to
+20
|
||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| ## Concurrency Groups | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| Workflows use dual concurrency control: per-workflow (based on context) and per-engine (one agent job at a time per AI engine). | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| ```yaml wrap | ||||||||||||||||||||||||||||||||||||||
| concurrency: | ||||||||||||||||||||||||||||||||||||||
| group: gh-aw-${{ github.workflow }} | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||||
| agent: | ||||||||||||||||||||||||||||||||||||||
| concurrency: | ||||||||||||||||||||||||||||||||||||||
| group: gh-aw-copilot | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+28
to
+33
|
||||||||||||||||||||||||||||||||||||||
| group: gh-aw-${{ github.workflow }} | |
| jobs: | |
| agent: | |
| concurrency: | |
| group: gh-aw-copilot | |
| # Workflow-level concurrency group is generated from workflow context | |
| group: ${{ ... }} | |
| jobs: | |
| agent: | |
| concurrency: | |
| # Job-level concurrency group is generated per engine/trigger | |
| group: ${{ ... }} |
Copilot
AI
Feb 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The stated default timeout is incorrect for this project. timeout-minutes defaults to 20 minutes for agentic workflows (see pkg/constants/constants.go:462-463 and schema description in pkg/parser/schemas/main_workflow_schema.json:1789-1793), not 360 minutes. Please update the default value and clarify what scope this field affects in compiled workflows.
| Jobs have maximum execution times (default: 360 minutes) controlled by the top-level `timeout-minutes` field: | |
| ```yaml wrap | |
| timeout-minutes: 120 # Apply 120-minute timeout to all jobs | |
| Jobs have maximum execution times (default: 20 minutes for agentic workflows) controlled by the top-level `timeout-minutes` field in the compiled workflow: | |
| ```yaml wrap | |
| timeout-minutes: 120 # Apply 120-minute job timeout to all jobs in the compiled workflow |
Copilot
AI
Feb 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assign-to-bot does not appear to be a supported safe output type (it’s not in the safe-outputs schema or config structs). Consider removing it from this table, or replacing it with an actual safe output type (for example assign-to-user) if that’s what was intended.
| | `assign-to-bot` | 1 | Prevent bot loops | | |
| | `assign-to-user` | 1 | Prevent bot loops | |
Copilot
AI
Feb 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The manual review gate example uses safe-outputs.dispatch-workflow.environment, but environment isn’t a supported field for safe output types in the schema (safe outputs support max and github-token, plus type-specific fields). Manual approvals are configured via on.manual-approval: <environment> (see docs/src/content/docs/reference/triggers.md). Please update this section (and the later example) to use manual-approval/job environment in the supported way.
| safe-outputs: | |
| dispatch-workflow: | |
| environment: production # Requires approval | |
| on: | |
| manual-approval: production # Requires approval | |
| jobs: | |
| protected-dispatch: | |
| environment: production |
Copilot
AI
Feb 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This full example uses stop-after at the top level and includes safe-outputs.assign-to-agent.environment, neither of which matches the documented schema (stop-after is under on:, and safe-outputs types don’t accept environment). Adjust the example to use on.stop-after and on.manual-approval (or another supported gating mechanism) so readers can copy/paste it successfully.
This issue also appears on line 46 of the same file.
| rate-limit: | |
| max: 5 | |
| window: 60 | |
| stop-after: +2h # Workflow time limit | |
| safe-outputs: | |
| assign-to-agent: | |
| max: 1 | |
| environment: production | |
| stop-after: +2h # Workflow time limit | |
| manual-approval: | |
| required: true | |
| environment: production | |
| rate-limit: | |
| max: 5 | |
| window: 60 | |
| safe-outputs: | |
| assign-to-agent: | |
| max: 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot add file to astro configuration in TOC
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added to sidebar in 89321a4. The "Rate Limiting Controls" entry now appears in the Reference section between "Permissions" and "Safe Inputs" (alphabetical order).