You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
squad init writes squad_state_<hash> to ~/.copilot/mcp-config.json on every init, contradicting iter-8 design #1296
squad init (at any state backend) unconditionally writes squad_state_<hash> to ~/.copilot/mcp-config.json via ensureSquadStateMcpInUserConfig (packages/squad-cli/src/cli/core/init.ts:408). One entry per project accumulates in HOME with no GC.
This contradicts the explicit iter-8 design intent documented at packages/squad-cli/src/cli/core/mcp-root.ts:1-27:
iter-7: wrote squad_state_<hash> into the user's HOME ~/.copilot/mcp-config.json. That polluted HOME with one entry per Squad project and required a stale-entry GC that we never built. It also touched a file outside the project, which is surprising for squad init / squad upgrade.
iter-8 flips it back inside the project: we write squad_state to a repo-root .mcp.json ... No HOME modifications.
But init.ts:408 then turns around and modifies HOME anyway. The accompanying comment // Also pin to user-level config for external 'copilot -p' compatibility claims this is for copilot -p mode, but copilot -p reads .mcp.json from the cwd too — the repo-root write at line 403 is already sufficient for that case.
Each new squad init adds another squad_state_<hash> entry; stale entries point at deleted/moved projects
The keys are opaque hashes, so users have no obvious way to clean them
squad upgrade (upgrade.ts:738) ALSO calls ensureSquadStateMcpInUserConfig, amplifying the problem
Defeats the iter-8 goal of "init/upgrade should not modify HOME"
Fix
Remove the two ensureSquadStateMcpInUserConfig calls (init.ts:408 and upgrade.ts:738). The repo-root .mcp.json writes (line 403 / line 728) cover all documented Copilot CLI launch modes including copilot -p from the project root.
For users who do invoke copilot -p from somewhere other than the project root, the right fix is to teach them --additional-mcp-config @.mcp.json (which init.ts:494 already documents as the recommended pattern).
Cleanup helper
A follow-up could add squad doctor --mcp-prune to walk ~/.copilot/mcp-config.json, find squad_state_<hash> entries whose target directory no longer exists, and remove them.
cc: discovered in the v0.10 stabilization weekend session.
Activity
fix: comments reference actual Copilot CLI version (≥1.0.59), drop ha…
fix(cli): stop writing squad_state to ~/.copilot/mcp-config.json on e…
chore: promote v0.10.1 dev → main + v0.10 stabilisation blog post (#1313
chore: promote dev → main (v0.11.0) (#1422)