[BUG] /insights: session-meta cache not invalidated when session .jsonl grows

Resolved 💬 3 comments Opened Feb 17, 2026 by hellaxe Closed Mar 17, 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?

/insights generates session-meta JSON files that cache session statistics (message counts, duration). Once generated, these files are never updated, even if the session .jsonl continues to grow (e.g. via continuation or long-running sessions). This leads to inaccurate reports — one session showed 3 messages in insights while actually containing 57.

What Should Happen?

Session-meta should be regenerated when the underlying .jsonl has changed (e.g. by comparing mtime/size).

Error Messages/Logs

Steps to Reproduce

  1. Start an interactive session, send a few messages
  2. Run /insights
  3. Continue the same session with many more messages (or let it auto-continue after context limit)
  4. Run /insights again
  5. Session stats remain frozen from step 2

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.44

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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