Repository navigation
Description
Hey,
I am trying to update the Squad in my repository from 0.13.0 to 1.0.1 using squad upgrade and I am getting the following error:
❯ squad upgrade
⚠️ squad.agent.md has local customizations — backed up to squad.agent.md.local-backup
To restore: copy squad.agent.md.local-backup → squad.agent.md
⚠️ Could not refresh squad.agent.md team capabilities: Cannot read a consistent casting registry/history pair: registry revision is invalid
✓ upgraded coordinator from 0.13.0 to 1.0.1
⚠️ Skill 'secret-handling' has been customized — overwriting with built-in version
⚠️ Skill 'git-workflow' has been customized — overwriting with built-in version
⚠️ Skill 'reviewer-protocol' has been customized — overwriting with built-in version
⚠️ Skill 'test-discipline' has been customized — overwriting with built-in version
⚠️ Skill 'squad-version-check' has been customized — overwriting with built-in version
⚠️ Skill 'cross-squad-communication' has been customized — overwriting with built-in version
⚠️ Skill 'tiered-memory' has been customized — overwriting with built-in version
⚠️ Skill 'reflect' has been customized — overwriting with built-in version
⚠️ Skill 'coordinator-response-mode' has been customized — overwriting with built-in version
✓ upgraded 53 squad-owned files
⚠️ squad-ci.yml has local customizations — backed up to squad-ci.yml.local-backup
⚠️ squad-docs.yml has local customizations — backed up to squad-docs.yml.local-backup
⚠️ squad-insider-release.yml has local customizations — backed up to squad-insider-release.yml.local-backup
⚠️ squad-preview.yml has local customizations — backed up to squad-preview.yml.local-backup
⚠️ squad-release.yml has local customizations — backed up to squad-release.yml.local-backup
✓ upgraded squad workflows (11 files)
✓ upgraded .github/copilot-instructions.md
Error: Cannot read a consistent casting registry/history pair: registry revision is invalid
at validatePairRoots (file:///C:/Users/laure/AppData/Local/Microsoft/WinGet/Packages/bradygaster.Squad_Microsoft.Winget.Source_8wekyb3d8bbwe/squad-win32-x64/app/node_modules/@bradygaster/squad-sdk/dist/casting/durable-registry.js:589:15)
at readCastingRegistryPair (file:///C:/Users/laure/AppData/Local/Microsoft/WinGet/Packages/bradygaster.Squad_Microsoft.Winget.Source_8wekyb3d8bbwe/squad-win32-x64/app/node_modules/@bradygaster/squad-sdk/dist/casting/durable-registry.js:1141:34)
at ensureCastingRegistryPairLocked (file:///C:/Users/laure/AppData/Local/Microsoft/WinGet/Packages/bradygaster.Squad_Microsoft.Winget.Source_8wekyb3d8bbwe/squad-win32-x64/app/node_modules/@bradygaster/squad-sdk/dist/casting/durable-registry.js:1022:22)
at ensureCastingRegistryPair (file:///C:/Users/laure/AppData/Local/Microsoft/WinGet/Packages/bradygaster.Squad_Microsoft.Winget.Source_8wekyb3d8bbwe/squad-win32-x64/app/node_modules/@bradygaster/squad-sdk/dist/casting/durable-registry.js:1062:16)
at ensureCastingDefaults (file:///C:/Users/laure/AppData/Local/Microsoft/WinGet/Packages/bradygaster.Squad_Microsoft.Winget.Source_8wekyb3d8bbwe/squad-win32-x64/app/node_modules/@bradygaster/squad-cli/dist/cli/core/upgrade.js:593:22)
at runEnsureChecks (file:///C:/Users/laure/AppData/Local/Microsoft/WinGet/Packages/bradygaster.Squad_Microsoft.Winget.Source_8wekyb3d8bbwe/squad-win32-x64/app/node_modules/@bradygaster/squad-cli/dist/cli/core/upgrade.js:798:26)
at runUpgrade (file:///C:/Users/laure/AppData/Local/Microsoft/WinGet/Packages/bradygaster.Squad_Microsoft.Winget.Source_8wekyb3d8bbwe/squad-win32-x64/app/node_modules/@bradygaster/squad-cli/dist/cli/core/upgrade.js:1232:11)
at async main (file:///C:/Users/laure/AppData/Local/Microsoft/WinGet/Packages/bradygaster.Squad_Microsoft.Winget.Source_8wekyb3d8bbwe/squad-win32-x64/app/node_modules/@bradygaster/squad-cli/dist/cli-entry.js:442:13)
It is not the first Squad update I am doing, and it seems that apparently .squad/casting/registry.json and .squad/casting/history.json were not properly updated in the past.
What I could about it?
Thanks for your help!
Metadata
Metadata
Assignees
Labels
No labels
Activity
janoveh commentedon Oct 5, 2026
I am seeing the exact same error when running
squad upgrade.squad doctorgives me this:(node:41284) [DEP0190] DeprecationWarning: Passing args to a child process with shell option true can lead to security vulnerabilities, as the arguments are not escaped, only concatenated. (Usenode --trace-deprecation ...` to show where the warning was created)🩺 Squad Doctor
═══════════════
Mode: local
✅ .squad/ directory exists — directory present
✅ config.json valid — parses as JSON, schema OK
✅ team.md found with ## Members header — file present, header found
✅ routing.md found — file present
✅ agents/ directory exists — directory present (9 agents)
❌ casting/registry.json exists — registry/history pair is invalid: Cannot read a consistent casting registry/history pair: registry revision is invalid
✅ decisions.md exists — file present
✅ .github/agents/squad.agent.md — file present (Copilot agent discovery file)
✅ Node.js ≥22.5.0 (node:sqlite) — v24.19.0 — node:sqlite available
ℹ️ vscode-jsonrpc exports field — not found in node_modules (expected for global installs)
ℹ️ copilot-sdk session.js ESM patch — not found in node_modules (expected for global installs)
✅ Copilot CLI available — copilot CLI reachable
Summary: 9 passed, 1 failed, 0 warnings, 2 info`
tamirdresher commentedon Oct 8, 2026
Thanks for flagging this, and sorry about the mess. We should handle this in the upgrade, not make you figure it out. From the output, it looks like some files were already updated before the casting check failed.
Could you share
.squad/casting/registry.jsonand.squad/casting/history.jsonfrom the same snapshot, ideally from before the upgrade? Also, what version were you on, what doessquad --versionshow now, and did you install through WinGet or npm? Do you have a commit or backup from before the upgrade?If those files contain anything sensitive, please don’t post them here. We can arrange to look at them privately.
Sanitized copies are fine too, just keep the structure and matching agent references intact.
For now, please back up
.squad,.github, and any.local-backupfiles, and hold off on rerunning the upgrade so we don’t overwrite those backups. Please don’t delete the casting files or changerevisionmanually either, since there are other consistency checks involved.Once we have the two files, we can reproduce this on a copy and work out a safe way to get you upgraded without losing your squad’s identities or history.
@bradygaster
tamirdresher commentedon Oct 8, 2026
I created a workaround, and Laurent tested it and reported that it seems to work. Sharing it here for anyone hitting the same error while we work on fixing this in the upgrader.
The scripts currently support Windows with a WinGet installation of Squad 1.0.1 only. The migration itself is not tied to WinGet, but the PowerShell wrapper looks for the SDK and CLI in the WinGet installation directory. It does not currently support npm-only installations.
Download
migrate-legacy-casting.mjsandrepair-squad-upgrade.ps1from this folder. Save both files together, for example inC:\temp\squad-repair.Close any Squad or Copilot sessions using the repository and try this on a repository copy first. Open PowerShell in that copy's root and run:
You'll need Node.js 22.5 or newer. The script backs up Squad configuration, archives the original casting files unchanged, migrates the legacy state, then runs the upgrade and
squad doctor.This is a temporary workaround for the legacy format we reproduced, not a general repair for every casting error. It stops if it encounters an unsupported format. The backup covers Squad configuration, not your entire repository.
Keep the backup folder printed by the script and review
git diffbefore committing, especially any customized skills, instructions or workflows. If it fails, please share the error without posting sensitive repository data.skimedic commentedon Oct 8, 2026
It failed for me:
node:internal/modules/run_main:107
triggerUncaughtException(
^
AssertionError [ERR_ASSERTION]: Unrecognized legacy snapshot: 2026-08-08T14:05:58.415-04:00-documentmanagement-alien-init
at file:///C:/Projects/AI/Squad/migrate-legacy-casting.mjs:46:3 {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: false,
expected: true,
operator: '==',
diff: 'simple'
}
Node.js v24.21.0
Migration failed. Repository files were not replaced. Backup:
C:\Users\japik\squad-upgrade-repair-98bab696786f4de49f160789b9ee5ae4\configuration-backup
At C:\Projects\AI\Squad\repair-squad-upgrade.ps1:78 char:5
de-repair-98bab696786f4de49f160789b9ee5ae4\configuration-backup
tamirdresher commentedon Oct 8, 2026
@skimedic I updated both scripts in the same shared folder. Please download both files again and retry on a repository copy.
The first version only supported snapshots with a
membersarray. The updated migration also handles the known legacyagentsID-array and ID/name-map formats, as well as usage records withused_at. It preserves existing update timestamps too.Your output shows that the script stopped before replacing repository files. I haven't seen your JSON yet, so I can't confirm that your exact format is covered. If the updated scripts still fail, please share sanitized
registry.jsonandhistory.jsonfrom the same snapshot, privately if needed. Please don't delete the casting files or guess a revision value.The wrapper still requires Windows, a WinGet installation of Squad 1.0.1, and Node.js 22.5 or newer. Use the same command from my previous comment. Keep the backup folder and review the diff before committing.
laurentkempe commentedon Oct 8, 2026
Thanks for your fantastic help @tamirdresher, very much appreciated!
Yes it worked for me
skimedic commentedon Oct 8, 2026
Backups cover Squad configuration, not the entire repository.
All Squad/Copilot sessions using this repository must be closed before proceeding.
node:internal/modules/run_main:107
triggerUncaughtException(
^
AssertionError [ERR_ASSERTION]: Unknown snapshot agent in 2026-08-08T14:05:58.415-04:00-documentmanagement-alien-init
at file:///C:/Temp/Squad/migrate-legacy-casting.mjs:79:7
at Array.map ()
at file:///C:/Temp/Squad/migrate-legacy-casting.mjs:78:43
at Array.map ()
at file:///C:/Temp/Squad/migrate-legacy-casting.mjs:51:88 {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: false,
expected: true,
operator: '==',
diff: 'simple'
}
Node.js v24.21.0
Migration failed. Repository files were not replaced. Backup:
C:\Users\japik\squad-upgrade-repair-928bdb48a80048568b1b15f554c8764b\configuration-backup. For an unsupported format,
share sanitized registry.json and history.json from the same snapshot; do not delete files or guess revisions.
At C:\Temp\Squad\repair-squad-upgrade.ps1:78 char:5
de-repair-928bdb48a80048568b1b15f554c8764b\configuration-backup. For an unsupported format, share sanitized regist
ry.json and history.json from the same snapshot; do not delete files or guess revisions.
history.json
registry.json
chore(squad): upgrade Squad to v1.0.1
chore(squad): upgrade Squad to v1.0.1
chore(squad): upgrade Squad to v1.0.1
chore(squad): upgrade Squad to v1.0.1
skimedic commentedon Oct 8, 2026
ok, I think I know how I got so hosed up. I was playing with the GH Copilot app and trying to use squad with it, and it went off the rails a bit. I just did the upgrade in a "clean" (e.g. no GH CP app use), and it worked flawlessly. Going to grab a pre-app use commit and see if the upgrade works on that, then will report back.
janoveh commentedon Oct 8, 2026
It worked for me now.
Thank you for the help @tamirdresher
chore(squad): upgrade Squad to v1.0.1
tamirdresher commentedon Oct 9, 2026
@bradygaster The permanent fix is ready for review: https://github.com/bradygaster/squad/pull/2190
I tested it against the official checksum-verified 0.13.0 and 0.13.1 Windows releases, using their actual initialization and casting writers. The released-state cases reproduce the 1.0.1 failure and upgrade successfully with the fix, preserving identities, dates and archived original files. Dry runs and repeat upgrades also passed.
The PR also fixes the machine-specific path written into shared MCP configuration and the CRLF-to-LF-only churn Laurent reported. Build/type checking and 313 targeted tests passed. The PR description includes the exact package-restore caveat from local validation.
This is not released yet; the scripts linked above remain the temporary workaround for supported Windows/WinGet 1.0.1 installations.
fix: copy unknown managed assets byte-for-byte
lkraav commentedon Oct 10, 2026
Also ran into this on npm.
Should go back to 0.13.1 until next release is published, right?
tamirdresher commentedon Oct 10, 2026
@lkraav I’ve added npm installation support to the shared workaround folder. You’re welcome to try it on a repository copy while the permanent fix in PR #2190 awaits review. It is not merged or released yet.
Download all three scripts together:
repair-squad-upgrade.ps1,repair-squad-upgrade.mjs, andmigrate-legacy-casting.mjs. Close Squad/Copilot sessions using the repository, then run this from the copy’s root:This prefers the project-local CLI if present, otherwise checks the global npm installation. To select global explicitly, add
-NpmScope global; for local only, add-NpmScope local. The CLI and the SDK it actually resolves must both be 1.0.1, with Node.js 22.5 or newer. Nothing is installed automatically.The npm-detection and repair flow was tested on Windows with Squad 1.0.1 modules in local, global, and nested-dependency layouts, including real upgrade and doctor runs. The WinGet path was also checked and remains the default when
-Installationis omitted. Linux/macOS end-to-end execution has not been tested.The scripts back up Squad configuration—not the whole repository—and retain byte-exact original casting files. Unsupported schemas, unknown agent references, missing dependencies, and version mismatches stop the repair rather than guessing revisions or deleting history. Keep the backup/log directory printed by the script.
Please review
git diffbefore committing. The workaround still invokes released 1.0.1, so customized skills/workflows, CRLF changes, and shared.mcp.jsonportability need inspection; those permanent fixes are in the PR. If it stops, share the error without posting sensitive repository data.fix: support evidenced historical casting assignments
Fix legacy casting upgrades, portable MCP config, and CRLF preservati…
Omzig commentedon Oct 16, 2026
Additional reproduction from an older project state: upgrading directly from Squad 0.11.0 to 1.0.0 on Windows with the globally installed npm CLI fails with the same
Cannot read a consistent casting registry/history pair: registry revision is invaliderror. The upgrade had already copied coordinator files and workflows before failing inensureCastingDefaults; the capability refresh also failed on the same casting pair.Manually migrating the legacy registry/history pair to the 1.0 format allowed the upgrade to complete while preserving the existing team and history. The merged fix was reported as tested against 0.13.0/0.13.1. Could compatibility with a genuine 0.11.0-era casting pair be confirmed or added to the migration regression fixtures?
fix(cli): 2.0.0-preview.2 upgrade/health fixes from dogfooding
fix(cli): 2.0.0-preview.2 upgrade/health fixes from dogfooding (#2303)