[BUG] /insights command crashes with TypeError: undefined is not an object (evaluating 'Object.keys(b)')
Resolved 💬 3 comments Opened Feb 9, 2026 by evyasaf-kerberus Closed Feb 13, 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?
The error TypeError: undefined is not an object (evaluating 'Object.keys(b)') means:
- The /insights command tries to iterate over an object using Object.keys(b)
- But b is undefined — the data it expects doesn't exist
- Object.keys(b) in the minified code is the variable name after bundling/minification
Likely cause: The /insights command expects some data (probably conversation history, usage stats, or cached metrics) to be
present, but it's either:
- Not initialized yet (e.g., first time running, no prior data)
- The data format changed in an update and the code doesn't handle the missing/changed shape
- A missing null check — the code doesn't guard against the data being undefined
It's essentially a missing null/undefined guard in the insights feature's code.
What Should Happen?
run /insights comnad
Error Messages/Logs
Steps to Reproduce
run /insights
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.37
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗