[BUG] /models command crashes when model description is undefined or null

Resolved 💬 3 comments Opened Jan 22, 2026 by CarlLee1983 Closed Jan 25, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When running the /models command, the CLI crashes with a TypeError because it attempts to call .split() on a model's description property that is undefined or null.

What Should Happen?

The /models command should list all available models without crashing,
gracefully handling cases where a model's description is undefined or null.

Error Messages/Logs

TypeError: J.description.split is not a function
    at file:///.../node_modules/@anthropic-ai/claude-code/cli.js:5232:14972
    at Array.map (<anonymous>)
    at file:///.../node_modules/@anthropic-ai/claude-code/cli.js:5232:14860
    at file:///.../node_modules/@anthropic-ai/claude-code/cli.js:5233:8064
    ...

Steps to Reproduce

  1. Open Claude Code CLI
  2. Run /models command
  3. Error occurs

Expected Behavior

The /models command should list available models without crashing, even if some models have missing or undefined description fields.

Actual Behavior

The command crashes because the code assumes description is always a string, but it can be undefined or null.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

v2.1.15

Claude Code Version

v2.1.15

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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