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 cast can't add a second member with the same role: the provenance "rename" heuristic matches on the exact role string #2524
AgentProvenanceError: New agent id "beta" ambiguously resembles existing role owner(s) alpha; supply the existing stable id for a rename
Teams with two or more people in the same role (two Test Engineers, two Backend Engineers) can't be cast with squad cast. The only workaround is to invent a distinct role string for each member. This failure also leaves partial state behind; that's #2525.
Why it looks wrong
The docblock on reconcileAgentProvenanceRegistry says identity binds only through the explicit id: "Display name, role, labels, paths, and other incidental signals never establish identity." The roleHints check makes role establish (suspected) identity anyway.
The hint can't be followed from the CLI. squad cast derives the id from --name, and it has no way to "supply the existing stable id for a rename." Renaming Alpha to Beta and adding Beta as a new member look identical, so the heuristic blocks the add.
Expected
Adding a member with a new id and a new display name always adds a member, even when its role matches someone else's. A rename should be explicit, for example squad cast --rename <existing-id> --name <new-name>, or a dedicated squad rename. That would supply the existing id to reconcileAgentProvenanceRegistry. The ambiguity check could be dropped, or turned into an informational note ("Alpha already holds Test Engineer; adding Beta as a second one").
Source
packages/squad-sdk/src/casting/agent-provenance.ts, lines 1194–1203 (if (!previous) { const roleHints = ... record.role === role ...; throw ... }). The docblock contradicting it is at lines 1142–1148.
packages/squad-cli/src/cli/commands/cast.ts: updateCastingStateWithAgent (line 295) passes one candidate { id: slug, displayName, role, universe: 'cli-cast' } and has no rename input.
Activity