fix(squad): start coding-agent sessions for squad:copilot issues; rename go/no-go workflows - #219
Merged
Merged
Conversation
…ame go/no-go workflows
The `squad:copilot` label alone never starts a Copilot coding-agent session — an
issue must be assigned to `copilot-swe-agent[bot]` via the agent-assignment API.
That assignment lives in squad-heartbeat.yml (Ralph), but it was gated off:
- .squad/team.md had no `🤖 Coding Agent` entry and no
`<!-- copilot-auto-assign: true -->` marker, so the step returned early.
- The step only assigned issues with zero assignees, but issue-go-yes always
assigns the go:yes maintainer, so every routed issue was skipped.
Fixes:
- team.md: add a Coding Agent section with the auto-assign marker (also makes
issue-labels-sync ensure the `squad:copilot` label exists).
- squad-heartbeat.yml (active + installed template): assign the bot to any open
`squad:copilot` issue that does not already have the agent, as an additional
assignee alongside the human owner.
Also rename the issue go/no-go decision workflows for discoverability:
- issue-nogo.yml -> issue-go-no.yml ("Issue Go: No")
- issue-assign.md -> issue-go-yes.md ("Issue Go: Yes")
- issue-clarify.md -> issue-go-clarify.md ("Issue Go: Clarify")
Display names set via gh-aw frontmatter `name:`; agentic .lock.yml recompiled.
NOTE: requires a COPILOT_ASSIGN_TOKEN repo secret (a PAT that can assign the
coding agent) for the assignment step to succeed.
Refs #194
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add a "Setting up COPILOT_ASSIGN_TOKEN" note to the Coding Agent section with links to fine-grained PAT creation, repository-secret setup, and the GitHub docs describing the exact token/permissions required to assign the Copilot coding agent. Docs-only; no workflow/code changes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add a deterministic post-check step to the "Issue Go: Yes" workflow that checks whether the approved (go:yes, squad:copilot) issue is actually assigned to the Copilot coding agent. When the COPILOT_ASSIGN_TOKEN secret is not configured (so squad-heartbeat cannot auto-assign), it posts a comment tagging the human assignee(s) explaining they must assign the issue to Copilot to start the work. When the token IS configured, the step is a no-op to avoid noise, since Ralph will auto-assign shortly. Runs in the injection-safe post-check job (not the agentic prompt), so the logic is deterministic. Grants that job issues:write to post the comment. Security note: issue-go-yes.lock.yml now references the COPILOT_ASSIGN_TOKEN secret only inside an expression (secrets.COPILOT_ASSIGN_TOKEN != '') to detect presence; the secret value is never read, logged, or sent anywhere. Refs #194 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Move the "assign this issue to Copilot" nudge out of the deterministic post-check job (which required issues:write) into the agent's single assignment comment, posted through the existing add-comment safe output. The post-check job is back to issues:read. Because the agent cannot read secrets, the gating is computed deterministically in the trusted "Prepare assignment context" shell step: NUDGE_NEEDED is true only when COPILOT_ASSIGN_TOKEN is absent (evaluated as the boolean `secrets.COPILOT_ASSIGN_TOKEN != ''`, never the value) AND the coding agent is not already an assignee. That result is injected into the trusted system-policy.md so the agent includes or omits the "### 🤖 Action needed" section accordingly. Security note: the raw COPILOT_ASSIGN_TOKEN value is materialized in exactly one place in the compiled lock — gh-aw's "Redact secrets in logs" step — so its value is scrubbed from agent logs and is never placed in the agent inference step or the prepare step (which only see the boolean). Refs #194 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The Copilot-assignment nudge must not expose workflow internals in the public issue thread. Remove the ".squad/team.md / COPILOT_ASSIGN_TOKEN setup" reference from the nudge the agent posts, and add explicit guards (system policy + comment-format template) instructing the agent to never mention COPILOT_ASSIGN_TOKEN, repository secrets, or workflow internals in the comment. The nudge now simply asks the assignee to assign the issue to Copilot from the Assignees menu. Refs #194 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the squad issue automation to (1) reliably start Copilot coding-agent sessions for squad:copilot issues by assigning copilot-swe-agent[bot], and (2) rename the go/no-go workflows so they group consistently in GitHub Actions.
Changes:
- Update
squad-heartbeatto assign the coding agent based on “agent not present” rather than “no assignees”. - Add a
## Coding Agentsection +<!-- copilot-auto-assign: true -->marker to.squad/team.mdso auto-assign is enabled and label sync can ensuresquad:copilotexists. - Rename go/no-go workflows (and regenerate the corresponding
gh-awlock files) with consistent “Issue Go: *” display names.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| .squad/templates/workflows/squad-heartbeat.yml | Template workflow: update Copilot auto-assign filtering logic (agent-presence based). |
| .squad/team.md | Add Coding Agent section + auto-assign marker and COPILOT_ASSIGN_TOKEN setup guidance. |
| .github/workflows/squad-heartbeat.yml | Active workflow: update Copilot auto-assign filtering logic (agent-presence based). |
| .github/workflows/issue-go-yes.md | Rename display name and add deterministic “handoff nudge” context when auto-assign isn’t configured. |
| .github/workflows/issue-go-yes.lock.yml | Regenerated compiled lock workflow reflecting rename + new context logic + secret redaction entries. |
| .github/workflows/issue-go-no.yml | Rename workflow display name to “Issue Go: No”. |
| .github/workflows/issue-go-clarify.md | Rename display name to “Issue Go: Clarify”. |
| .github/workflows/issue-go-clarify.lock.yml | Regenerated compiled lock workflow reflecting rename changes. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
petehauge
approved these changes
Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two related changes to the squad issue automation:
squad:copilot→ Copilot coding-agent handoff (the reason issues like [Doc Drift] README.mdapiops initflags table missing--artifact-diroption #194 sit idle after routing).Problem
An issue can be labeled
squad:copilotand still never get worked on. That's because the label alone does not start a Copilot coding-agent session — the issue must be assigned tocopilot-swe-agent[bot]via the agent-assignment API. That assignment lives insquad-heartbeat.yml(Ralph), but it was gated off two ways:.squad/team.mdhad no🤖 Coding Agententry and no<!-- copilot-auto-assign: true -->marker, so the assign step returned early.issue-go-yesalways assigns thego:yesmaintainer as owner — so every routed issue was filtered out.Changes
Part A — repair the handoff
.squad/team.md: add a## Coding Agentsection with the🤖 Coding Agententry and the<!-- copilot-auto-assign: true -->marker. Placed outside## Membersso it isn't treated as a routable squad member. This also makesissue-labels-sync.ymlensure thesquad:copilotlabel exists.squad-heartbeat.yml(active +.squad/templates/workflows/copy): assigncopilot-swe-agent[bot]to any opensquad:copilotissue that doesn't already have the agent, added alongside the human owner (thePOST /assigneesendpoint appends, it doesn't replace).Part B — rename go/no-go workflows
issue-nogo.ymlissue-go-no.ymlIssue Go: Noissue-assign.md/.lock.ymlissue-go-yes.md/.lock.ymlIssue Go: Yesissue-clarify.md/.lock.ymlissue-go-clarify.md/.lock.ymlIssue Go: ClarifyDisplay names set via gh-aw frontmatter
name:(verified honored), preserving the descriptive agent H1 titles. The agentic.lock.ymlfiles were regenerated withgh aw compile(v0.81.6); unrelated lock files were left untouched.The assign step uses
secrets.COPILOT_ASSIGN_TOKEN || secrets.GITHUB_TOKEN. Assigning the coding agent generally requires a PAT — a maintainer must add aCOPILOT_ASSIGN_TOKENrepo secret (a token that can assign the Copilot coding agent). Until then the step is a safe no-op.Validation
gh aw compile: 0 errors / 0 warnings..lock.ymlfiles carry the correctname/workflow_id; old ones removed; no dangling references to the old names remain.Related Issue(s)
apiops initflags table missing--artifact-diroption #194 — the doc-drift issue that surfaced this; it should be picked up by the coding agent once this merges andCOPILOT_ASSIGN_TOKENis set. This PR does not itself fix the README drift.Notes
.github/and.squad/(nosrc//tests/changes)..squad/templates/workflows/squad-heartbeat.ymlalready diverged from the active workflow (action versions, schedule); this PR only syncs the specific assign-step logic. The upstream squad-cli template should get the same fix to survivesquad upgrade.