[Bug] /insights crashes with TypeError ERR_INVALID_ARG_TYPE: path must be string, got array
Resolved 💬 2 comments Opened Feb 5, 2026 by ilyakorolev Closed Mar 6, 2026
Bug Description
Running /insights command crashes immediately with:
TypeError [ERR_INVALID_ARG_TYPE]: The "path" property must be of type string, got array
Steps to Reproduce
- Open a project that is a subdirectory within a larger monorepo, where multiple
CLAUDE.mdfiles are loaded (global + parent + project) - Run
/insights - Crash occurs
Likely Cause
The project has 3 CLAUDE.md files loaded:
~/.claude/CLAUDE.md(global)/path/to/monorepo/CLAUDE.md(parent)/path/to/monorepo/sub/project/CLAUDE.md(project)
It appears /insights resolves the CLAUDE.md path as an array of paths instead of a single string, then passes that array to a Node.js fs function that expects a string.
Environment Info
- Claude Code version: 2.1.32
- Platform: macOS (Darwin 25.3.0 arm64)
- Node: v23.11.0
- Terminal: iTerm2
Related
Possibly related to #23138 (different TypeError in /insights on macOS).
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗