Skip to content

Init Mode writes a custom script against SDK internals to rename the scaffolded cast and fails provenance and history validation #2539

Backlog

Description

@tamirdresher

Version: squad-cli 1.1 (installed with npm i -g), Copilot CLI 1.0.114-0, Windows, Node 22

What happened: In a repo with a scaffolded .squad/ and an empty roster, Init Mode Phase 2 approved a custom roster. The coordinator then wrote an ad hoc .mjs script that called reconcileAgentProvenanceRegistry and commitCastingRegistryPair directly. It failed in two ways:

  • AgentProvenanceError: Agent id "lead" cannot change role from "Lead / Architect" to "Engineering Lead"
  • Cannot commit casting registry/history: history snapshot is malformed

How the agent recovered: It read durable-registry.js and edited the script until validation passed. The casting files were therefore built by hand rather than by squad cast.

Expected: Init Mode applies an approved roster through a supported command, including renaming or changing the role of a scaffolded agent. The coordinator never edits casting state with scripts that call SDK internals.

Related: #2525 (squad cast is not atomic after an AgentProvenanceError).

Open question: Why the coordinator chose the script path. I'm requesting a session export from the reporter and will attach findings here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions