github / github/gh-aw

[copilot-opt] Debounce redundant Agentic Commands / Squad re-triggers on the same branch

Open
#60,899 0 comments 0 reactions 0 assignees View on GitHub
cookie copilot-opt optimization orchestration
Dominant language
Go
Stars
5.1k
Forks
541
Avg merge
5h 48m
Merged PRs (30d)
773

Description

### Problem
The same branch is repeatedly re-triggering the identical set of downstream CI/orchestration workflows (`Agentic Commands`, `Squad`) multiple times within minutes, each ending in `action_required` (a status requiring manual approval/intervention). This indicates redundant re-dispatch/model-loading rather than a single coordinated run per push, wasting orchestration cycles and creating repeated manual-approval backlog.

### Evidence
- Analysis window: 2026-08-31 to 2026-09-14 (14-day scope, all 50 available session runs)
- Sessions analyzed: 50 GitHub Actions runs in `sessions-list.json`
- Key metrics/examples:
- 31 of 50 runs (62%) in the sample end with conclusion `action_required`
- Branch `copilot/add-cli-regression-coverage` alone triggered `Agentic Commands` **6 times** and `Squad` **6 times** between 16:20 and 16:45 UTC on 2026-09-14, all ending `action_required`
- Branch `copilot/handle-special-errors` triggered `Agentic Commands` and `Squad` **4 times each** within an 18-second window (16:45:39–16:45:57 UTC), again all `action_required`
- These repeated runs on the same branch/commit range are consistent with each new push (or each bot comment/label event) re-triggering the full `Agentic Commands`/`Squad` moderation pipeline instead of debouncing to the latest state

### Proposed Change
Add debouncing/concurrency control (e.g. GitHub Actions `concurrency` group keyed on `head_branch`, combined with cancel-in-progress) to the `Agentic Commands` and `Squad` workflow triggers so that rapid successive events on the same branch collapse into a single run reflecting the latest commit, rather than queuing a full independent run per event.

### Expected Impact
- Cuts redundant `Agentic Commands`/`Squad` invocations by an estimated 60-80% on actively-iterated branches
- Reduces the `action_required` manual-approval backlog, since fewer superseded runs will need dismissal
- Frees compute/orchestration capacity for genuinely new work

### Notes
- Distinct root cause category: inefficient orchestration/model-loading patterns
- Data quality caveat: no `events.jsonl`/conversation logs were available for these sessions; this finding is derived entirely from GitHub Actions run metadata (name, head_branch, created_at, conclusion) in `sessions-list.json`, not per-session tool traces. Enabling conversation/event log capture for these workflow runs would allow deeper root-cause analysis of tool latency and payload size in a future pass.

> Generated by [⚡ Copilot Opt](https://github.com/github/gh-aw/actions/runs/34876283982) · copilot · auto · 85.8 AIC · ⌖ 10.5 AIC · ⊞ 8.5K · [◷](https://github.com/search?q=repo%3Agithub%2Fgh-aw+is%3Aissue+%22gh-aw-workflow-call-id%3A+github%2Fgh-aw%2Fcopilot-opt%22&type=issues)

Contributor guide

Open the contributing guide

Research direction

Start by locating the workflow definitions for Agentic Commands and Squad, then compare their triggers with the repeated runs documented in sessions-list.json. Review how branch and event context can be used for concurrency control. Done means rapid successive events on one branch no longer leave redundant superseded runs while the latest state still runs.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
ci-cd, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.