Insights report: narrative sections silently missing when usage limit hit during generation

Resolved 💬 2 comments Opened Feb 8, 2026 by renjith100 Closed Mar 8, 2026

Bug Description

Running /insights while hitting the usage limit mid-generation produces an incomplete HTML report. The quantitative sections (charts, stats) are rendered, but all 8 narrative sections are silently missing. The navigation tabs at the top link to anchors that don't exist, so clicking them does nothing.

Steps to Reproduce

  1. Run /insights in Claude Code
  2. Hit the usage limit during the command execution (the synthesis/aggregation step)
  3. Open the generated report.html

Expected Behavior

Either:

  • The report should be fully generated (all sections populated), or
  • If generation is interrupted by a usage limit, the report should show a clear error/warning indicating it's incomplete (e.g., "Report generation was interrupted — some sections may be missing")

Actual Behavior

  • The HTML report is generated with all chart/stats sections intact (built from per-session facet data)
  • The 8 narrative sections are completely absent from the HTML — no id attributes, no content, just blank lines where they should be
  • The nav bar still renders all 8 tabs, but clicking them does nothing since the target anchors don't exist
  • The insights data object is empty ({})
  • No error or warning is shown to the user — the report appears complete at first glance

Missing Sections

| Nav Tab | Expected Anchor |
|---|---|
| What You Work On | #section-work |
| How You Use CC | #section-usage |
| Impressive Things | #section-wins |
| Where Things Go Wrong | #section-friction |
| Features to Try | #section-features |
| New Usage Patterns | #section-patterns |
| On the Horizon | #section-horizon |
| Team Feedback | #section-feedback |

Evidence

  • 17 per-session facet JSON files were successfully generated in the facets directory
  • The HTML template was rendered with charts populated from facet data
  • Lines 124, 271, 415, 471, 527, 529, 531, 533 in report.html are blank — where section content should have been injected
  • The insights data passed to the report was {}

Environment

  • Claude Code (VS Code extension)
  • macOS (Darwin 25.2.0)
  • 43 sessions, 354 messages analyzed

Suggested Fix

  1. If insights generation is interrupted (e.g., by a usage limit), surface a visible warning in the report HTML
  2. Hide or disable nav tabs for sections that weren't generated
  3. Consider making the generation more resilient to interruptions (e.g., save partial progress, or retry the synthesis step)

View original on GitHub ↗

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