Skip to content

bug(gh-aw): /squad cast fails on first attempt (SDK skill discovery + history.json validator mismatch) #2473

Done

Description

@tamirdresher

Summary

When a user installs the GitHub Agentic Workflows package (github/squad/workflows@534894c5d1702d20e71d49778c95764fba92f383 or b37155bef49c8e2ff6a211dfe71bda53157bc92f) and comments /squad cast on an issue, the workflow fails on the first attempt due to two separate bugs in workflows/squad.md (and workflows/package/squad.md):

  1. SDK Session Skill Discovery Bug (copilot-sdk: true):

    • Activation extracts the 28 inline skills (including .github/skills/squad-cast/SKILL.md) and the Agent job restores them into ${GITHUB_WORKSPACE}/.github/skills/.
    • However, when copilot-sdk: true is active, the default gh-aw SDK driver connects to the headless Copilot CLI sidecar (127.0.0.1:3002) and calls client.createSession(...) without passing workingDirectory or skillDirectories: [join(workspace, ".github", "skills")].
    • As a result, <available_skills> in the session system prompt only lists customize-cloud-agent and github-pr-media. When the agent calls skill({ skill: "squad-cast" }), the tool returns Skill not found: squad-cast, and the agent obeys the instruction not to improvise and halts with report_incomplete.
  2. Playbook vs. Deterministic Validator Schema Mismatch (squad-cast Step 3 vs. squad-cast-validator.mjs):

    • Even when the agent reads .github/skills/squad-cast/SKILL.md directly from disk via bash, Step 3 item 5 of the squad-cast playbook instructs the agent to write .squad/casting/history.json as:
      { "universe_usage_history": [{ "universe": "descriptive-or-Universe", "assigned_at": "ISO", "agent_count": N }], "assignment_cast_snapshots": {} }
    • Meanwhile, squad-cast-validator.mjs (validateCastingPairFiles) requires:
      • universe_usage_history entries to use "used_at" (rejecting "assigned_at" with registry: universe usage history is malformed), and
      • assignment_cast_snapshots to be non-empty and contain a matching revision snapshot (e.g. "cast-revision-1" with created_at === registry.generated_at, agents, and universe), without leftover transaction_id / registry_revision fields from the disposable activation preset when no commit manifest is present.
    • Because validateCastingPairFiles fails on history.json, the validator treats the active specialist set as empty (specialists=0), cascading into 20+ false-positive charter, routing, and payload errors.

Steps to Reproduce

  1. Install github/squad/workflows in a consumer repository with gh-aw v0.91.5 and merge the installation to main.
  2. Open an issue describing the desired team scope and comment /squad cast.
  3. Observe run failure 1: skill("squad-cast") fails with Skill not found: squad-cast and the agent emits report_incomplete.
  4. Instruct the agent to read .github/skills/squad-cast/SKILL.md from disk and retry /squad cast.
  5. Observe run failure 2: run-squad-cast-validator exits 1 with registry: universe usage history is malformed and coordinator: capability counts must equal active/routing state (specialists=0, ...).

Proposed Fix

  1. Bind workingDirectory: root and skillDirectories: [join(root, ".github", "skills")] in createSession when running under copilot-sdk: true (or instruct Execute Mode in squad.md to read .github/skills/<skill-name>/SKILL.md directly from disk when skill() is not registered in the headless SDK session).
  2. Update Step 3 item 5 of the squad-cast playbook in workflows/squad.md and workflows/package/squad.md so the history.json example matches squad-cast-validator.mjs (used_at, assignment_cast_snapshots["cast-revision-1"], revision: 1 for a fresh Cast, and stripping disposable preset transaction_id / registry_revision fields).

Activity

  1. added a commit that references this issue on Nov 12, 2026
    1175f82
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