Repository navigation
Description
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
- Add
name: "{name}"to the spawn template in squad.agent.md (lowercase cast name) - Make the shell regex more robust — try multiple extraction patterns before falling through
- Add fuzzy matching against
knownAgentNameswhen exact match fails - Add a fallback that at least shows the task description even if agent name cannot be extracted
- Consider extracting agent name from the
prompttext 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
github-actions commentedon Mar 23, 2026
📋 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.
fix(shell): robust agent name extraction with multi-pattern fallback (#…
docs(.squad): VOX history + decision for #577 agent name fix
chore: sync squad.agent.md template copies after #577 name param fix
Orchestration Log: Issue #577 agent name extraction completion
bradygaster commentedon Mar 23, 2026
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.
fix(shell): robust agent name extraction with multi-pattern fallback (#…
fix(shell): robust agent name extraction with multi-pattern fallback (g…