/insights command throws TypeError: H.indexOf is not a function

Status Fixed / completed
Maintainer reply None cached
Activity 6 comments · opened Apr 18, 2026 · closed May 8, 2026

Describe the Bug
When I run the /insights command in Claude Code, the application directly throws an error instead of functioning normally.

Error Message

TypeError: H.indexOf is not a function. (In 'H.indexOf($,q)', 'H.indexOf' is undefined)

Steps to Reproduce

  1. Start Claude Code CLI
  2. Run the /insights command
  3. Observe the TypeError being thrown

Expected Behavior
The /insights command should work normally without throwing errors.

Environment

  • Claude Code CLI version: v2.1.114
  • Platform: Windows 11 Pro
  • Terminal: Windows Terminal 1.23.20211.0
  • Also occurs in VS Code terminal

Additional Context

  • This issue was first detected starting from version v2.1.110
  • The bug still persists in the current version v2.1.114
  • The /insights command is completely unusable due to this error

View original on GitHub ↗

6 Comments

github-actions[bot] · 4 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/31162
  2. https://github.com/anthropics/claude-code/issues/38224
  3. https://github.com/anthropics/claude-code/issues/40199

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

sun-chong · 4 months ago

I have checked other issues, and there are indeed no other cases of the H.indexOf error when running the /insights command. The closest one is #43106, but it has already been closed. However, I still encounter this error when running the /insights command in the current v2.1.114 version.

sun-chong · 4 months ago

This issue still exists in version v2.1.116.

naikekillar · 4 months ago

Reproducing on macOS as well.

Platform: macOS (Apple Silicon — MacBook Air)
Version: 2.1.118
Error: TypeError: H.indexOf is not a function. (In 'H.indexOf(_,q)', 'H.indexOf' is undefined)
Session files: 1184 .jsonl files, zero empty, zero malformed JSON
~/.claude/usage-data/ did not exist before running /insights

Same behavior — command crashes immediately, no report generated.

sun-chong · 4 months ago

@ashwin-ant Please help check this error. It is similar to the issue described in #43106, and still persists in the latest version v2.1.123. The /insights command is completely unusable. Thank you.

github-actions[bot] · 2 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.