[BUG] /insights language categorizer silently drops .hack files (Hack programming language)
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?
/insights language categorizer doesn't recognize .hack (aka Hacklang) files (Slack webapp / Facebook Hack language)
The Languages breakdown in the /insights report appears to silently drop .hack files. Across 46 sessions — many of them heavily editing .hack files in Slack's webapp repo — my report shows only TypeScript, Markdown, Shell, JSON, and Go . No Hack, no PHP, despite hundreds of Hack file edits over the past six weeks.
Confirmed by inspecting ~/.claude/usage-data/session-meta/*.json: sessions with clearly backend/Hack-focused project_path either have "languages": {} or only list frontend languages, even when files_modified is non-zero. No entries anywhere in the cached metadata contain a "Hack" or "PHP" key.
The raw session JSONLs under ~/.claude/projects/ do contain .hack file paths in tool call entries (grep -l ".hack" ~/.claude/projects//.jsonl returns 20+ matches on my machine). The data is captured correctly; only the downstream language categorizer in /insights drops them.
Impact: For Slack/Meta/any org using Hack, the Languages chart is meaningfully wrong — the dominant backend language is invisible. This underweights backend work and overweights TypeScript/frontend work in the visual breakdown.
Likely fix: Add .hack (and probably .php if not already present) to the extension → language map in the categorizer. Hack uses the .hack extension in strict mode and .php in legacy files.
Environment: Claude Code on macOS, Opus 4.7. Report generated 2026-05-01.
What Should Happen?
These files should be included in the insights Languages section. The Languages breakdown lists Hack (or at minimum PHP) with a count reflecting the number of Hack file touches.
Error Messages/Logs
Steps to Reproduce
- In Claude Code, open a session in a repository containing .hack files.
- Perform several Edit / Write / Read operations on .hack files during the session.
- Let the session complete; optionally run multiple sessions with substantial Hack edits.
- Run /insights.
- Open the generated report (~/.claude/usage-data/report.html) and look at the Languages chart.
Claude Model
Opus
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.126
Platform
AWS Bedrock
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗