Skip to content

fix(shell): robust agent name extraction with multi-pattern fallback (#577)#578

Merged
bradygaster merged 5 commits intodevfrom
squad/577-fix-agent-name-display
Mar 24, 2026
Merged

fix(shell): robust agent name extraction with multi-pattern fallback (#577)#578
bradygaster merged 5 commits intodevfrom
squad/577-fix-agent-name-display

Conversation

@bradygaster
Copy link
Copy Markdown
Owner

Closes #577

What changed

Root causes identified:

  1. Fragile regex in shell/index.ts that only matched emoji+Name: format
  2. Spawn templates missing name parameter - platform showed generic slugs
  3. No fallback when regex extraction failed - showed generic text

Fixes (3 agents, parallel):

  • VOX: Replaced inline regex with parseAgentFromDescription() import, improved fallback
  • FIDO: Extracted parser to agent-name-parser.ts with 3-tier matching, wrote 30 tests
  • Procedures: Added name param to all 4 spawn templates in canonical squad.agent.md

Testing

  • 30 new tests passing (agent name extraction)
  • 146 template sync tests passing
  • Full suite: 4914+ passed, build clean

Copilot AI added 5 commits March 23, 2026 15:17
Merged 12 decision inbox entries into decisions.md. Logged mega-session
covering release recovery, docs fix, 10 PR merges, discussion triage,
and release hardening. Updated agent histories with session learnings.

Deleted inbox files after merge:
- booster-ci-audit.md, booster-ci-cleanup.md
- copilot-directive-2026-03-23T09-56.md, copilot-directive-2026-03-23T10-08.md
- copilot-directive-no-npx.md
- eecom-version-cmd.md
- pao-discussion-triage-2026-03-23.md, pao-npx-purge.md, pao-readme-slim.md
- pao-v090-blog.md
- surgeon-v090-changelog.md, surgeon-v091-retrospective.md

Updated files:
- .squad/decisions.md (12 decision entries merged)
- .squad/identity/now.md (current state updated)
- .squad/log/2026-03-23T22-00-00Z-mega-session-wrapup.md (new)
- .squad/agents/flight/history.md (issue filing patterns, governance directives)
- .squad/agents/eecom/history.md (CLI version subcommand pattern)
- .squad/agents/booster/history.md (CI audit and preflight patterns)
- .squad/agents/surgeon/history.md (release governance rules, retrospective)
- .squad/agents/pao/history.md (discussion triage patterns, Teams MCP urgency)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…577)

- Fix TS compilation errors in agent-name-parser.ts (strict null checks)
- Add fallback in else branch: show trimmed description text instead of
  generic 'Dispatching to agent...' hint when name extraction fails
- Parser tries 3 patterns: emoji+name:colon, name:colon anywhere, fuzzy
  word-boundary match against known agent names

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Agent orchestration complete for #577:
- VOX: Fixed agent name extraction in shell/index.ts with 3-tier cascading patterns
- FIDO: Extracted parser to agent-name-parser.ts (30 tests, all passing)
- Procedures: Updated all spawn templates with mandatory name parameter

Actions:
- Created 3 orchestration logs (.squad/orchestration-log/)
- Created session log (.squad/log/2026-03-23T23-15-issue-577-agent-names.md)
- Merged 3 decision inbox files to .squad/decisions.md (3 new decision entries)
- Deleted inbox files after merge
- Appended team updates to VOX, FIDO, Procedures history.md files

All decisions merged. Agent IDs now display correctly in Copilot CLI tasks panel.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bradygaster bradygaster added priority:p0 Blocking release bug Something isn't working labels Mar 23, 2026
@bradygaster bradygaster merged commit 561b1a3 into dev Mar 24, 2026
2 checks passed
@bradygaster bradygaster deleted the squad/577-fix-agent-name-display branch March 24, 2026 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority:p0 Blocking release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants