[Bug] Menu parsing error with BMAD agent - X.description.split is not a function

Resolved 💬 3 comments Opened Jan 17, 2026 by leing2021 Closed Jan 21, 2026

Bug Description

When using BMAD (Business Model for AI Development) agents, the menu parsing fails with a TypeError: X.description.split is not a function error.

Error Message

TypeError: X.description.split is not a function
    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:5266:11309
    at Array.map (<anonymous>)
    at jx0 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:5266:11197)
    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:5267:7115
    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:5267:8139

Steps to Reproduce

  1. Install BMAD framework
  2. Run /bmad:bmm:agents:dev command
  3. When the menu is displayed, enter any menu command (e.g., "da" to dismiss)
  4. Error occurs

Root Cause Analysis

The menu items in BMAD agent files use mixed format:

<item cmd="MH ...">[MH] Redisplay Menu Help</item>
<item cmd="DS ..." workflow="...">[DS] Execute Dev Story workflow...</item>
<item cmd="PM ..." exec="...">[PM] Start Party Mode</item>

When menu items have attributes like workflow or exec, the text content is not being correctly parsed as the description property, causing the .split() method to fail.

Environment

  • OS: macOS (Darwin 25.2.0)
  • Claude Code Version: 2.1.11
  • Node.js: (from Homebrew installation)

Expected Behavior

Menu items should be parsed correctly regardless of whether they have additional attributes.

Actual Behavior

Menu parsing crashes when menu items contain workflow or exec attributes.

Workaround

Use /chat command instead of the agent menu system.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗