/m command crashes with TypeError: $.description.split is not a function
Resolved 💬 6 comments Opened Jan 14, 2026 by orendi84 Closed Feb 28, 2026
Description
The /m command (model selection) crashes with a JavaScript error, preventing users from changing models interactively within a session.
Error Message
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
TypeError: $.description.split is not a function. (In '$.description.split(" ")', '$.description.split' is undefined)
Steps to Reproduce
- Start Claude Code session
- Run
/mcommand to change model - Error occurs immediately
Environment
- Platform: macOS (Darwin 25.2.0)
- Claude Code version: Latest
- GitHub CLI version: 2.74.1
Expected Behavior
The /m command should display a model selection menu allowing users to switch between available models (opus, sonnet, haiku).
Workaround
Users can restart Claude Code with the --model flag:
claude-code --model opus
Additional Context
The error suggests that the code is attempting to call .split() on a description field that is either undefined or not a string type.
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗