Skip to content

P0: Agent cast names not displayed during work — showing generic agent type names instead #577

Closed

Description

@bradygaster

Bug: Agent names showing as generic names during work

Priority: P0 — user-facing regression, undermines team identity UX

What's happening

When agents are working, the user sees generic names (e.g. "general-purpose", "Dispatching to agent...") instead of their cast character names (e.g. "EECOM", "Flight", "FIDO"). This is a regression — names were previously displayed correctly.

Root cause analysis

Three contributing issues identified:

1. Shell regex is fragile (primary display path)

File: packages/squad-cli/src/cli/shell/index.ts:682

const agentMatch = desc.match(/^\S*\s*(\w+):/);
const matchedAgent = agentMatch?.[1]?.toLowerCase();
if (matchedAgent && knownAgentNames.includes(matchedAgent)) {
  // Show agent name + activity
} else {
  // FALLS THROUGH TO GENERIC: "Dispatching to agent..."
  const hint = hintMap[toolName] ?? 'Using toolName...';
}

This regex depends on the coordinator LLM formatting description exactly as "{emoji} {CastName}: {task}". If the format drifts even slightly (common with LLM outputs), the name extraction fails silently and the generic fallback at line 692 kicks in.

2. name parameter missing from spawn template

File: .squad-templates/squad.agent.md (spawn template section)

The spawn template specifies description but NOT the name parameter for the task tool:

agent_type: "general-purpose"
mode: "background"
description: "{emoji} {Name}: {brief task summary}"

In the Copilot CLI, the name parameter generates the human-readable agent ID shown in the tasks panel. Without explicit guidance, the coordinator LLM ad-libs name — often using generic slugs like "general-purpose-task" instead of the cast name.

3. No validation or fallback for name extraction failure

File: packages/squad-cli/src/cli/shell/index.ts:691-694

When the regex fails to extract a known agent name, the code falls through to a completely generic hint with no attempt to show ANY useful name — no fuzzy matching, no partial detection, no logging.

Impact

  • Users see "Dispatching to agent..." or "general-purpose" instead of their team's cast names
  • Undermines the team identity UX that makes Squad feel alive
  • Makes it hard to tell which agent is doing what during parallel work

Suggested fix areas

  1. Add name: "{name}" to the spawn template in squad.agent.md (lowercase cast name)
  2. Make the shell regex more robust — try multiple extraction patterns before falling through
  3. Add fuzzy matching against knownAgentNames when exact match fails
  4. Add a fallback that at least shows the task description even if agent name cannot be extracted
  5. Consider extracting agent name from the prompt text as a last resort

Repro

Spawn any agent in the Squad shell or Copilot CLI agent environment — observe that the activity panel shows generic names instead of cast character names.

Activity

  1. added
    squadSquad triage inbox — Lead will assign to a member
    on Mar 23, 2026
  2. github-actions commented on Mar 23, 2026

    @github-actions
    Contributor

    📋 Assigned to EECOM (Core Dev)

    Issue: #577 — P0: Agent cast names not displayed during work — showing generic agent type names instead

    EECOM will pick this up in the next Copilot session.

    For Copilot coding agent: If enabled, this issue will be worked automatically.
    Otherwise, start a Copilot session and say:
    EECOM, work on issue #577

  3. bradygaster commented on Mar 23, 2026

    @bradygaster
    CollaboratorAuthor

    Fixed in PR #578. Three-pronged fix: extracted robust agent name parser with 3-tier matching, added name param to spawn templates, improved fallback display. 30 new tests. Verified via symlink test.

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

    bugSomething isn't workingpriority:p0Blocking releasesquadSquad triage inbox — Lead will assign to a member

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions