Skip to content

[Bug] squad watch triage fails silently — wrong label slug + missing label pre-creation #784

Closed

Description

@tamirdresher

Bug: squad watch triage fails silently — wrong label slug + missing label pre-creation

Symptoms

  • squad watch shows 🔴 Untriaged: 1 but never assigns a squad:{member} label
  • Issue stays untriaged forever across rounds
  • In-session "Ralph, go" works fine for the same issue

Root Cause (reproduced with test repo)

Bug 1 — Wrong label slug. Watch triage derives the label from the agent's display name in team.md (e.g., "Steve Rogers" → squad:steve rogers) instead of the agent's directory slug (e.g., steve-rogers → squad:steve-rogers).

Bug 2 — No label pre-creation. gh issue edit --add-label "squad:steve-rogers" requires the label to already exist in the GitHub repo. If it doesn't exist, gh returns exit code 1 with error 'squad:steve-rogers' not found. Watch swallows this error and the issue stays untriaged.

Reproduction

# Create a squad with multi-word agent names (e.g., Marvel universe)
# team.md has: Steve Rogers, Tony Stark, Natasha Romanoff
# .squad/agents/ has: steve-rogers/, tony-stark/, natasha-romanoff/

# Create issue with squad label
gh issue create --title "Test" --label squad

# Run watch
squad watch --interval 1

# Watch shows Untriaged: 1 but never assigns
# Because it tries: gh issue edit --add-label "squad:steve rogers"
# Which fails: label doesn't exist + wrong slug format

Expected Behavior

  1. Watch should derive label slugs from agent directory names (.squad/agents/{slug}/), not display names
  2. Watch should pre-create missing squad:{member} labels on startup or before first assignment
  3. Triage errors should be surfaced (at minimum in --verbose mode), not swallowed

Affected Code

  • packages/squad-sdk/src/ralph/triage.ts — label slug derivation
  • packages/squad-cli/src/cli/commands/watch/index.ts — triage error handling

Workaround

Manually create labels before running watch:

gh label create "squad:steve-rogers" --color d4c5f9
gh label create "squad:tony-stark" --color d4c5f9
# etc.

Related

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