[BUG] /insights command throws TypeError: b.split is not a function

Resolved 💬 3 comments Opened Mar 11, 2026 by hasibagen Closed Mar 15, 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?

Bug Description

The /insights slash command fails with a JavaScript TypeError when invoked:

TypeError: b.split is not a function. (In 'b.split(\n)', 'b.split' is undefined)

Steps to Reproduce

  1. Start Claude Code CLI
  2. Run /insights command
  3. Observe the error in the output

What Should Happen?

The /insights command should either:

  • Execute successfully and provide insights, OR
  • Display a clear error message if the command is deprecated/removed

A cryptic JavaScript TypeError is displayed, indicating an internal bug where a variable expected to be a string is actually undefined or a non-string type.

Error Messages/Logs

▐▛███▜▌   Claude Code v2.1.72
▝▜█████▛▘  glm-5 · API Usage Billing
  ▘▘ ▝▝    

❯ /insights                                                                                                                              
  ⎿  TypeError: b.split is not a function. (In 'b.split( )', 'b.split' is undefined)

Steps to Reproduce

/insights

Claude Model

Other

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.72

Platform

Other

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

Environment

┌──────────────┬───────────────────────────────────┐
│ Component │ Version │
├──────────────┼───────────────────────────────────┤
│ Claude Code │ 2.1.72 │
├──────────────┼───────────────────────────────────┤
│ OS │ Ubuntu 24.04.4 LTS (Noble Numbat) │
├──────────────┼───────────────────────────────────┤
│ Kernel │ 6.17.0-14-generic │
├──────────────┼───────────────────────────────────┤
│ Node.js │ v18.19.1 │
├──────────────┼───────────────────────────────────┤
│ Architecture │ x86_64 │
└──────────────┴───────────────────────────────────┘

Additional Context

  • The command appears in command history (used once on 2025-02-25), suggesting it may have worked in a previous version
  • No insights skill was found in any installed plugin directories
  • This could be either:

a. A deprecated command that wasn't properly removed
b. An internal bug in the command handler where a variable is not properly validated before calling .split()

Installed Plugins

From ~/.claude/settings.json:

  • oh-my-claudecode@omc
  • document-skills@anthropic-agent-skills
  • code-review@claude-plugins-official
  • planning-with-files@planning-with-files
  • superpowers@claude-plugins-official
  • ralph-loop@claude-plugins-official
  • claude-code-setup@claude-plugins-official
  • skill-creator@claude-plugins-official
  • claude-md-management@claude-plugins-official
  • hookify@claude-plugins-official
  • claude-hud@claude-hud

View original on GitHub ↗

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