diff --git a/docs/src/content/docs/reference/concurrency.md b/docs/src/content/docs/reference/concurrency.md index 3f1ad90c743..edda4cf988a 100644 --- a/docs/src/content/docs/reference/concurrency.md +++ b/docs/src/content/docs/reference/concurrency.md @@ -53,8 +53,23 @@ tools: --- ``` +## Safe Outputs Job Concurrency + +The `safe_outputs` job runs independently from the agent job and can process outputs concurrently across workflow runs. Use `safe-outputs.concurrency-group` to serialize access when needed: + +```yaml wrap +safe-outputs: + concurrency-group: "safe-outputs-${{ github.repository }}" + create-issue: +``` + +When set, the `safe_outputs` job uses `cancel-in-progress: false` — meaning queued runs wait for the in-progress run to finish rather than being cancelled. This is useful for workflows that create issues or pull requests where duplicate operations would be undesirable. + +See [Safe Outputs](/gh-aw/reference/safe-outputs/#safe-outputs-job-concurrency-concurrency-group) for details. + ## Related Documentation - [AI Engines](/gh-aw/reference/engines/) - Engine configuration and capabilities - [Frontmatter](/gh-aw/reference/frontmatter/) - Complete frontmatter reference - [Workflow Structure](/gh-aw/reference/workflow-structure/) - Overall workflow organization +- [Safe Outputs](/gh-aw/reference/safe-outputs/) - Safe output processing and job configuration diff --git a/docs/src/content/docs/reference/safe-outputs.md b/docs/src/content/docs/reference/safe-outputs.md index ee4e8ccd27f..f46d5d02c47 100644 --- a/docs/src/content/docs/reference/safe-outputs.md +++ b/docs/src/content/docs/reference/safe-outputs.md @@ -1348,6 +1348,18 @@ safe-outputs: Specify custom runner for safe output jobs (default: `ubuntu-slim`): `runs-on: ubuntu-22.04` +### Safe Outputs Job Concurrency (`concurrency-group:`) + +Control concurrency for the compiled `safe_outputs` job. When set, the job uses this group with `cancel-in-progress: false` (queuing semantics — in-progress runs are never cancelled). + +```yaml wrap +safe-outputs: + concurrency-group: "safe-outputs-${{ github.repository }}" + create-issue: +``` + +Supports GitHub Actions expressions. Use this to prevent concurrent safe output jobs from racing on shared resources (e.g., creating duplicate issues or conflicting PRs). + ### Custom Messages (`messages:`) Customize notifications using template variables and Markdown. Import from shared workflows (local overrides imported).