Repository navigation
fix(coordinator): resolve all P1 coordinator bugs — externalized state, teamRoot, stale work, cleanup loops - #1132
Merged
Conversation
…nd cleanup loops Addresses all 4 P1 coordinator bugs: - #1116: Add State & Team Root Resolution section before mode-switch check. Reads config.json stateLocation/teamRoot before deciding Init vs Team mode. - #1127: Worktree Awareness step 0 checks config.json overrides first, so satellite/linked repos correctly resolve their remote team root. - #1125: Add WORK FRESHNESS rule to spawn template — external tracker is authoritative, agents must verify against it before working on items. - #1067: Make AFTER work best-effort with tool call budget (80 max), explicit stop-on-failure, and Scribe-only skill extraction. Closes #1116, Closes #1127, Closes #1125, Closes #1067 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Squad coordinator agent governance file (squad.agent.md) and all four template mirrors with prompt-level instructions to fix four P1 coordinator behaviors: externalized-state resolution (#1116), satellite teamRoot redirect (#1127), tracker-authoritative work freshness (#1125), and a bounded, best-effort post-work cleanup phase (#1067).
Changes:
- Adds a "State & Team Root Resolution" section before the Init/Team mode check, plus a step 0 in the Worktree Awareness algorithm to honor
config.jsonstateLocation/teamRootoverrides. - Adds a "WORK FRESHNESS" rule to the spawn prompt declaring the external tracker authoritative over local plan/checkbox files.
- Reworks the spawn prompt's "AFTER work" section into a best-effort phase with an 80 tool-call budget, stop-on-failure semantics, and Scribe-only skill extraction (removes the git-notes decision-write step in the git-notes branch).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
.github/agents/squad.agent.md |
Runtime coordinator prompt: all four fixes applied. |
.squad-templates/squad.agent.md |
Canonical template mirror of the runtime file. |
templates/squad.agent.md.template |
Top-level template mirror. |
packages/squad-cli/templates/squad.agent.md.template |
CLI-package template mirror. |
packages/squad-sdk/templates/squad.agent.md.template |
SDK-package template mirror. |
.changeset/fix-p1-coordinator-bugs.md |
Patch changeset for @bradygaster/squad-cli describing the fix. |
The git note was inadvertently removed when fixing the infinite cleanup loop (#1067). Restore it as a single-attempt, no-retry instruction so it still annotates the commit when it succeeds but cannot cause retry loops. Closes #1067 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Addresses reviewer feedback that a hard 80-call session budget could clip legitimate primary work in complex tasks. The budget now applies only to post-work hygiene (max 20 calls), and agents skip post-work entirely if they've already used 60+ calls on primary work. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
Fixes all 4 P1 coordinator bugs in a single coherent change to
squad.agent.md(and all template copies).Bugs Fixed
config.json.stateLocationbefore mode checkteamRootin config.json ignored → Init Mode in satellite reposteamRoot; Worktree Awareness step 0 checks config overrides firstChanges
.github/agents/squad.agent.md— all 4 fixes.squad-templates/squad.agent.md— mirrorpackages/squad-cli/templates/squad.agent.md.template— mirrorpackages/squad-sdk/templates/squad.agent.md.template— mirrortemplates/squad.agent.md.template— mirrorHow to test
squad init --mode remote <path>in a fresh repo, then start a Copilot session — coordinator should find the team via config.json redirect instead of entering Init Mode.Notes
Closes #1116, Closes #1127, Closes #1125, Closes #1067