Long-session analytics: request for task-episode metadata alongside compact_boundary (796-turn design sessions observed)
Context
We analyze Claude Code sessions programmatically (fail-closed analytics; 128 sessions / 7 days in a multi-vendor orchestration). In our usage, long design sessions are the norm: up to 796 turns (median 33). We understand compact_boundary records and the compaction/resume hooks exist — and we use them.
Request
For third-party analytics, task-episode metadata in the persisted project JSONL would be valuable: an explicit episode identifier (or turn-range map) so tools can split a long session into task episodes without inferring boundaries from content.
Aggregate motivation
In our window, design-production sessions ran up to 796 turns; analytics that treat the whole file as one episode misattribute outcomes across multiple tasks. Episode metadata would make per-episode success measurement reliable (we score outcomes as completed / blocked-by-decision / interrupted / unknown, role-aware).
Related field-report package (structural specimen, tokenized; aggregate tables):
https://github.com/oguzhanpisgin/ai-session-analytics
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗